V
V
Verkan2020-12-13 19:46:54
SQL
Verkan, 2020-12-13 19:46:54

How to build this query?

There is a table of sites, it has a column with domain.
5fd645005d7c7846084125.png
How to get a list of all top level domains?
For example, I can choose:

select * from `sites` where `domain` regexp '.(ru)$'

And how to get an array of top-level domains that are now in the database, I don’t know how (
Response Example

Request and response: ['ru',shop','com'......]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman, 2020-12-13
@Verkan

SUBSTRING_INDEX() function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question