Skip to content

Tag: mysql

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

SQL Combine two queries and SUM

Ok I am a little rusty in SQL. I have 2 exactly same tables with columns ID, Name, Gender, BG. BG is a internal reference. I can query each table individually: SELECT Gender,BG, COUNT(BG) CountValue …