select 10 rows per day with order

前端 未结 9 837
感情败类
感情败类 2021-02-06 16:08

i have a db with records with date (timestamp) i need to select 10 records for each day (there are many more per day) and order them by few columns...

how should that qu

9条回答
  •  一个人的身影
    2021-02-06 16:25

    If you are working with MySQL, and the column is of type timestamp. You need to convert it to Date and then compare it with the date you want to compare with.

    SELECT * FROM tablename tName

    where

    Date(timestampFieldName) = Date('2009-07-08')

    limit 0,10

提交回复
热议问题