mysql group by 組內排序

http://blog.csdn.net/shellching/article/details/8292338shell

 

全部SSD配置的最近生效費率查詢.net


select * from billing_rates_tbl as tt
where
sub_res_id like "%ssd::%"
and res_type="server"
and unit="M"
and duration = "12"
group by sub_res_id, effective_date having
effective_date=(select max(effective_date) from billing.billing_rates_tbl where sub_res_id=tt.sub_res_id)server

相關文章
相關標籤/搜索