There is a table with some events that has a structure:
id,name,date
, events have an annual periodicity (like holidays). It is necessary to select events in such a way that the next five events are displayed, if for example 10 events occur on a single day, then at each request, five random events were issued.
Resolved:
select * from table where date>=CURRENT_DATE order by date,rand()limit 5