write a query for list of owner who are having multiple
bikes in below table
1 shanker pulsar
2 shanker Honda
3 shanker car
4 Balu pulsar
5 Balu Honda
6 Balu car
7 Shyam pulsar
8 Jaya Honda
9 Deepa car
10 vasu car

Answers were Sorted based on User's Feedback



write a query for list of owner who are having multiple bikes in below table 1 shanker pulsar 2 ..

Answer / madhu sudhan g

Hii guys lets the table is Table_Bikes to get the answer the query is

with CTE(count,name)
AS
(
select count(1) as count,name from Table_Bikes Group By Name
)
select Name from CTE where count>1

Is This Answer Correct ?    0 Yes 0 No

write a query for list of owner who are having multiple bikes in below table 1 shanker pulsar 2 ..

Answer / uttam sing rawat

select distinct Owner_Name from dbo.Tbl_Owner where bike
in(Select distinct bike from dbo.Tbl_Owner)

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More SQL Server Interview Questions

What is b tree index?

0 Answers  


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

0 Answers  


Explain what are the events recorded in a transaction log?

0 Answers  


What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

11 Answers   World Tech, Yardi Software,


How to create a new login name in ms sql server?

0 Answers  






What is PROJECTION Operation?

0 Answers   Infosys,


Find 2nd Highest salery in emp table Select* from emp where &n= select * count from emp where (salery >=emp.salery) Enter n value 2 These query is correct or not. Tell me any other methods.

6 Answers  


What is a ddl statement?

0 Answers  


Explain isolation levels that sql server supports?

0 Answers  


what is trigger . hw will it use them

2 Answers   TCS,


What is precedence constraint?

0 Answers  


When would you use the stored procedures or functions?

0 Answers  


Categories