select mch_nm, sum(trx_amt) as sum_trx_amt from cmb_usr_trx_rcd
where usr_id = 5201314520 and year(trx_time) = '2024'
group by mch_nm
order by sum(trx_amt) desc
select * from scores
where
exam_date = '2024-06-30'
and
(
(subject = '历史' and score >= 90)
or (subject = '政治' and score >=90)
or (subject = '地理' and score >=90)
)
order by score desc, student_id, subject
select * from scores
where
exam_date = '2024-06-30'
and
(subject = '历史' and score >= 90)
or (subject = '政治' and score >=90)
or (subject = '地理' and score >=90)
order by score desc, student_id, subject
select * from hand_permutations
where
concat(card1, card2) like '%A%A%' or
concat(card1, card2) like '%A%K%' or
concat(card1, card2) like '%K%K%' or
concat(card1, card2) like '%K%A%'
order by id;