Skip to content
Advertisement

MYSQL getting data from three tables

I am trying to find the drinker and total amount of money spent on drinks for all drinkers in February 2020. I also need to include drinkers who haven’t ordered a drink in this period.

Here are the three tables:

Here is my statement so far:

I am very new to SQL, I know that there are a number of mistakes. Any help would be greatly appreciated!

Advertisement

Answer

You could use a join as

and if you need only february

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement