+------------+-----------+-------------------+----------------+-------------------------------+ | n | n_parse | pct_n_parse_of_n | n_parse_mf_ni | pct_n_parse_mf_ni_of_n_parse | +------------+-----------+-------------------+----------------+-------------------------------+ | 656646289 | 33701182 | 5.1323 | 74684 | 0.2216 | +------------+-----------+-------------------+----------------+-------------------------------+ select n, n_parse, round(100 * n_parse / n, 4) as pct_n_parse_of_n, n_parse_mf_ni, round(100 * n_parse_mf_ni / n_parse, 4) as pct_n_parse_mf_ni_of_n_parse from ( select count(*) as n, count(if(uri_query like '%action=parse%', 1, null)) as n_parse, count(if(uri_query like '%action=parse%' and uri_query like '%mobileformat%' and uri_query like '%noimages%', 1, null)) as n_parse_mf_ni from wmf.webrequest where year = 2018 and month = 11 and day = 28 and uri_path = '/w/api.php' ) as numbers ;