I
I
Ivan Melnikov2018-04-18 08:38:17
MySQL
Ivan Melnikov, 2018-04-18 08:38:17

Is it possible to display a two-dimensional table in the console in MySQl SELECT?

For example, a request

SELECT user_id, count(user_id) FROM Message WHERE date='2018-01-01' GROUP BY user_id;

displays the number of messages from each user for the date 2018-01-01.
Is it possible to somehow continue the table to the right with columns '2018-01-02', '2018-01-03', etc.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alj, 2018-04-21
@immelnikoff

Obviously, the correct option to make such a query would be group by user_id, date.
But, if you want entertainment and cross-query output in MS Access style, you can use the same MySQL to form a query that will perform the required SELECT. Example: https://ru.stackoverflow.com/questions/764260/mysq...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question