Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- COUNT(user_id) AS total
- FROM (
- SELECT
- user_id,
- center_id,
- start,
- trial_id,
- sign
- FROM user_results__2020 r
- WHERE status = 1
- AND IFNULL(result, "") <> ""
- AND MONTH(start) BETWEEN 1 AND 3
- AND start = (
- SELECT
- MAX(start)
- FROM user_results__2020
- WHERE user_id = r.user_id
- AND trial_id = r.trial_id
- AND center_id = r.center_id
- AND status = 1
- AND MONTH(start) BETWEEN 1 AND 3
- AND IFNULL(result, "") <> ""
- )
- ) ur;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement