I am new to databases, I am not sure how to query these 3 tables.
I am trying to find out the total deaths(Table COVID - TotalDeathUK) of each strain(Table Strain) for the last 1 year(Table - Time?)
Table COVID
centerid | patientid | dateid | strainid | totaldeathsuk |
----------+-----------+--------+----------+---------------+
100000 | 100000 | 100000 | 100000 | 31369 |
100000 | 100000 | 100000 | 100000 | 95382 |
100004 | 100004 | 100004 | 100000 | 46031 |
----------------------------------------------------------------
Table Strain
strainid | name | risk
----------+-----------+------
100000 | Fixflex | 50
100001 | Cardguard | 85
100002 | Zaam-Dox | 53
Table Time
dateid | year | month | quater | week | dayofweek | hour
--------+------+--------------+--------+------+-----------+----------
100007 | 2039 | Thin Ice | 2 | 3 | 7 | 11:54:00
100008 | 2109 | Parineeta | 4 | 1 | 6 | 20:12:00
100011 | 2096 | Crawlspace | 4 | 2 | 7 | 19:03:00
Link to Image of the Database Schema