这个有点难表述:
有重复字段中不同key的行数
select count(*) from fund_netvalue group by fundcode
select distinct fundcode from fund_netvalue
select count(*) from (select distinct fundcode from fund_netvalue) as fund01
发现一种新的写法:
SQL语句中and or问题
不多说吗,直接看图
正确写法:
#1select * from frm_auditlog where (operation=3051 or operation=3061) and keyparam2='GCSPDB' limit 50#2select * from frm_auditlog where keyparam2='GCSPDB' and operation in (3051,3061) order by logdt desc