I'm developping an asp.net project. I need to filter database with two different conditions and show each in a pie chart. So i need to get two columns in one query.
Column 1 :
select COUNT (*) 'OAS' from atmterminalfile (nolock) where Atstatu='2' and atlinestat ='1'
Column 2 :
select COUNT (*) 'OFS' from atmterminalfile (nolock) where Atstatu='2' and atlinestat ='2'
I searched many solutions, i tried UNION but result was this
| OAS |
|----------------|
| Column 1 Count |
| Column 2 Count |
i just need this.
| OAS | OFS |
---------------------------------------
| Column 1 Count | Column 2 Count |