sql

 select ('鄭州市')name,count(1)"value" 
from jgobject_jyjcnl where  
jgobject_jyjcnl.zzjgdm
in (select zzjgdm from shiYsJyjc_permit where qydmid in 
( select distinct id from area start with parentId=2 connect by prior id=2)) and jgobject_jyjcnl.leib like '%中國火腿%'
union all
select ('開封')name,count(1)"value" 
from jgobject_jyjcnl where  
jgobject_jyjcnl.zzjgdm
in (select zzjgdm from shiYsJyjc_permit where qydmid in 
( select distinct id from area start with parentId=16 connect by prior id=16)) and jgobject_jyjcnl.leib like '%中國火腿%'


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章