Home > database > Please the teacher give a SQL statement
Please the teacher give a SQL statement
Time:10-11
Select * from zf_post_cz where type=0 and to_days (create_time)=to_days (now ()); It is concluded that
CodePudding user response:
To build a temporary table, field ids, player_name, now, create_time, prev_d, prev_create_time
With group by the last record in the each player's id, player_name, now, create_time inserted into a temporary table, associated player_name again, now the former a record id and create_time updates to the temporary table prev_d, prev_create_time, the last query in the temporary table two create_time interval in 1 hour