Categories
How to choose from 2 tables? MySQL?
Good day to all, how to choose a name from 2 tables and, by its box number, select the number of its bananas for a specified date from 1 table?
Answer the question
In order to leave comments, you need to log in
Can be done with a subquery
select t2.name, (SELECT sum(bananas) from t1 WHERE t1.id=t2.id and t1.date = '2016.07.02') FROM t2 WHERE name = 'Denis'
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question