Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Dmitriy Lanets
Added: Nov 22, 2019 7:50 AM
Views: 4
Tags: mysql
  1. SELECT COUNT(d) AS c, DATE_FORMAT(s.sse_timestamp,"%Y-%m-%d") AS dat FROM(
  2. SELECT ss.sse_timestamp,TO_DAYS(ss.sse_timestamp) AS d, sse_time FROM search_stat ss WHERE ss.sse_time > 100 AND  ss.sse_timestamp >=  NOW() - INTERVAL 14 DAY) AS s
  3.   GROUP BY d
  4.   ORDER BY s.sse_timestamp DESC