There is an advertisement table advertise(advertise_id, date, count), the data is as follows:
I need to calculate the number of clicks per day for the top 10 ads within a certain period of time.
The result of the query should be that there are 10 pieces of data with different advertise_id every day. How should this SQL be written?
There is a problem that the number of clicks on the advertising date that does not appear in the record is not displayed. If you want to display it, you need to construct this part of the data first. If it is not displayed, just use the following sql
It should be like this