-
bundling more than 1 query into 1 query
Hi,
I have 3 different sql queries.
1. select x,count(*) from tab where x in (a,b,c) and y<100 group by x
2. select x,count(*) from tab where x in (a,b,c) and y between 100 and 200 and z< 10 group by x
3. select x, count(*) from tab1 where x in (a,b,c) and y > 100
My question is can the above three queries be written in a single query?
-
Yes you can do it using INNER JOIN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|