IIabm/SQL_check_num_dis_firm_in_t...

20 lines
498 B
MySQL
Raw Normal View History

2023-06-05 16:01:20 +08:00
select * from
(select s_id, ts, count(id) as num_dis_firm from
iiabmdb.with_exp_result
where ts > 0
group by s_id, ts) as a
where a.num_dis_firm > 3;
select * from
iiabmdb.with_exp_result
where s_id = '54170';
SELECT * FROM iiabmdb.with_exp_sample where id='54170';
SELECT max(id) FROM iiabmdb.with_exp_sample;
select * from
(select s_id, id_firm, id_product, ts, count(id) as num_dup from
iiabmdb.with_exp_result
where ts > 0
group by s_id, id_firm, id_product, ts) as a
where a.num_dup > 1;