HI i havind table like stindent,zpindent,Tpindent table
in this tables COunt(drugs),SUM(qty),SUM(fundamt) group by finyear
same like other tables bt columns name difference
i want to display this three table data in one gridview like this formate ST table,Zp Table ,Tp Table
| Sl. No. | Fin Year | Sector | No. of Drugs | Qty. of Drugs | Indent Amount | Action | |||
| 1 | 2019-20 | ST | view | ||||||
| 2 | 2019-20 | ZP | view | ||||||
| 3 | 2019-20 | TP | view | ||||||
| 4 | 2018-19 | SS | view |

Laxmidhar SahooRank #383 · 6.6K reputationPosted Nov 30, 2019, 1:57 AM EST
Vrushali GhodkeRank #1,495 · 1.1K reputationPosted Dec 3, 2019, 1:56 AM EST
Ramachandran MRank #2,660 · 522 reputationPosted Dec 3, 2019, 3:35 AM EST
SELECT ID as 'Sl.No' , FinYear, Sector ,SUM(Drugs) OVER(PARTITION BY FinYear) AS 'No Drugs' ,SUM(Qty) OVER(PARTITION BY FinYear) AS ' Qty. of Drugs' ,SUM(Amt) OVER(PARTITION BY FinYear) AS ' Amt' FROM ST st inner join Zp zp on zp.id=st.id inner join Tp tp on tp.id=st.id