Reputation: 33
Query:
Select
COUNT(aciklama)as Permitted,
(Select COUNT(aciklama)
from Uyari
where Aciklama like '%Blocked%') as Blocked
From
Uyari
where
Aciklama like '%Permitted%'
Output:
Permitted Blocked
----------------------
74 9194
I want result like this:
Permitted ... 74
Blocked ... 9194
Could any one help?
Upvotes: 3
Views: 1467
Reputation: 62851
Here's one option using union all
select 'Permitted' action, COUNT(aciklama) as result
from Uyari
where Aciklama like '%Permitted%'
union all
select 'Blocked' action, COUNT(aciklama)
from Uyari
where Aciklama like '%Blocked%'
Upvotes: 2