I'm trying to populate a list of data into a line charts. My X-axis will be my StartTime and my Y-axis will be Total
Wanted to ask is it possible to query a range of data and if the data is not in the database and return it as null instead of no show, take an example below:
|StartTime |Qty |
-----------------------
|10 |1 |
|11 |3 |
|12 |2 |
|13 |1 |
|11 |2 |
What's my expected result: WHERE CLAUSE AS StartTime within 9 TO 12
|StartTime |TOTAL |
-----------------------
|9 |NULL |
|10 |1 |
|11 |5 |
|12 |2 |
Can anyone show me and example of what the query will be? Because I have no idea at all.
StartTime, or is it just assumed/implied, that each hour exists? The answer to this question would determine the query structure and how simple or complex the resulting query will be,StartTime.