M
M
maks789452020-02-12 17:05:55
MySQL
maks78945, 2020-02-12 17:05:55

How to merge and group data from multiple tables?

Good day.
There are several tables (all have a type and data field), I need to get all unique values ​​from the type field in which the data field is greater than a certain value.
Help with advice, how to be, what to use?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2020-02-12
@maks78945

SELECT `type`
  FROM `table1`
  WHERE `date` > :date
UNION SELECT `type`
  FROM `table2`
  WHERE `date` > :date
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question