Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL Query to produce multiple calculated count columns.

$
0
0

Hello SQL Masters,

We are trying to write query which can produce included sample output for SSRS. Here, i am including sample query to produce ONLY 1 calculated column but how can I produce ALL calculated columns in 1 single query?

Selectcount(*) fromdbs.flight_legasflinnerjoindbs.flight_leg_dlyasfdly (onfdly.flt_nbr=fl.flt_nbr and fdly.fleet_type = fl.fleet_type)whereyear(fdly.flt_ts)=2013andmonth(fdly.flt_ts)=01and        fl.dly_type<>''and        fl.charge_dly_dept='GOS' and

fl.dly_code<>'C' and fl.fleet_type = 'MD-80'

Thanks bunch in advance..


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>