you are here: codestackercodes [RSS]autosimulado queries

autosimulado queries

-- mostra o número de usuários novos criados dia a dia
select date_format(created_at,'%d/%m/%y') as data, count(id) as total from leonardo_supertestes.users group by date_format(created_at,'%m-%d') order by date_format(created_at,'%m-%d');

-- mostra o número de testes feitos dia a dia
select date_format(created_at,'%d/%m/%y') as data, count(rate) as total from leonardo_supertestes.results group by date_format(created_at,'%m-%d') order by date_format(created_at,'%m-%d');

-- conta o número total de usuários
select count(id) from leonardo_supertestes.users;

-- conta o número total de testes feitos
select sum(hits) from leonardo_supertestes.exams;

Comments