第一个:
select * from g_cardapply where g_applydate='2009-2-20'
第二个:
http://blog.csdn.net/lukyers/article/details/45867661
第三个:
select g_idcard,count(g_idcard) as records from g_cardapplydetail
group by g_idcard having count(g_idcard)>=2
第四个:
select g_applyno,
sum(case when g_state='0' then 1 else 0 end) as 等待审核,
sum(case when g_state='1' then 1 else 0 end) as 审核通过 ,
sum(case when g_state='2' then 1 else 0 end) as 审核未通过 ,
count(*) as 总个数
from g_cardapply
group by g_applyno
第五个:
with temp as
( select row_number() over(order by g_applyno desc) as rownum,g_applyno , g_applydate,g_state from g_cardapply)
select * from temp p where rownum<=10
百度SQL语句查询语句
为什么我看不了图片?谢谢
看看别人的博客应该不难