G
G
ganbatte2020-01-09 13:25:34
MySQL
ganbatte, 2020-01-09 13:25:34

How to make query in query in mysql?

there is such a table 'table'
|id |id_2|name|status| date|
it is necessary that, when requested, it displays where status = true, and count_id = number of id for 30 days.
|id|id_2|name|status|date| count_id |
I can only do this
select * from table where status=true ; And how to add an additional column count id where it asks for the number of id in 30 days?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Zhikhor, 2020-01-09
@ganbatte

Тебе поможет подзапрос https://metanit.com/sql/mysql/4.8.php и функция count https://oracleplsql.ru/mysql-function-count.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question