SQL Get all records older than 30 days

后端 未结 3 440
走了就别回头了
走了就别回头了 2020-12-24 10:20

Now I\'ve found a lot of similar SO questions including an old one of mine, but what I\'m trying to do is get any record older than 30 days but my table field is unix_timest

3条回答
  •  误落风尘
    2020-12-24 11:14

    Unless I've missed something, this should be pretty easy:

    SELECT * FROM profiles WHERE last_login < NOW() - INTERVAL '30 days';
    

提交回复
热议问题