I have a table with that looks like
Date | BookID | Rating | Review
2012-10-12 | 2 | 3 | 3
2012-10-13 | 2 | 7 | 9
2012-10-16 | 3 | 4 | 2
Each day, a book can receive a number of rating and review
I am trying to write a query that given two dates, it displays the rating and review for each book, for EACH day in between the two given dates. Even when that day has no rating or no review I still want to display the date and the BookID
For example, in the table above, I want the query to return something like
Date | BookID | Rating | Review
2012-10-12 | 2 | 3 | 3
2012-10-13 | 2 | 7 | 9
2012-10-14 | 2 | null | null
2012-10-15 | 2 | null | null
2012-10-16 | 3 | 4 | 2
How can I do this please?
This gives the results:
That’s one extra row than the results you posted, but I believe is correct – it doesn’t return any rows for a bookid before the first review which looks like what you were after