I'm working using Amazon Quick Sight pulling data from an MySQL database to generate visual data for my employer. I'm a student and have a little SQL experience but have never had to deal with a database this large before.
The tables I need to grab from are 001_leads to 024_leads. The tables are all designed the same way.
This is what I've currently been doing to no avail. Quick Sight doesn't give back great error alerts so I've been hacking at different solutions.
SELECT 001_leads.lead_received AS "City-A Leads Q1",
002_leads.lead_received AS "City-B Leads Q1"
FROM 001_leads, 002_leads
WHERE lead_received BETWEEN '2017-01-01' AND '2017-04-01'
I'm fairly positive I need use a join but I have no clue how to join 24 different tables.
Ideally when this query runs it will show every lead from every city.
Thanks for having a look :)
EDIT: