This query is marked as a draft This query has been published by Nux.

SQL

x
 
SELECT 
    LEFT(log_timestamp, 6) AS month,
    COUNT(*) AS suppressredirect_count
    -- , DATE_FORMAT(STR_TO_DATE(CONVERT(LEFT(min(log_timestamp), 8) USING utf8), '%Y%m%d%'), '%Y-%m-%d') as min_t
    -- , DATE_FORMAT(STR_TO_DATE(CONVERT(LEFT(max(log_timestamp), 8) USING utf8), '%Y%m%d%'), '%Y-%m-%d') as max_t
    , RIGHT(LEFT(min(log_timestamp), 8), 2) as min_t
    , RIGHT(LEFT(max(log_timestamp), 8), 2) as max_t
    , min(log_id) as min_id, max(log_id) as max_id
FROM logging_userindex
WHERE log_action = 'move'
  AND log_params LIKE '%s:10:"5::noredir";s:1:"1"%'
  AND log_actor = 299
  AND STR_TO_DATE(CONVERT(log_timestamp USING utf8), '%Y%m%d%H%i%S') >= DATE_SUB(CURDATE(), INTERVAL 12 MONTH)
GROUP BY month
ORDER BY month;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...