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 are triggers in ms sql server?

0 Answers  


How to convert binary strings into integers in ms sql server?

0 Answers  


What is a print index?

0 Answers  


How do I start sql server agent automatically?

0 Answers  


Describe in brief databases and sql server databases architecture.

0 Answers  






What is difference between restoration and recovery in SQLServer?

3 Answers   Microsoft,


What is the latest version of microsoft sql server?

0 Answers  


How to execute function in stored procedure sql server?

0 Answers  


You are creating an application where users are asked their gender in the gender combo box you have three options: ‘male’ , ‘female’ and ‘i choose not to disclose’ these options are stored in the table as 1, 0 or null which datatype should you use?

0 Answers  


What are key, name and value columns of an attribute? : sql server analysis services, ssas

0 Answers  


What is database replicaion? What are the different types of replication you can set up in SQL Server?

5 Answers   Aptech, HCL, Perpetual, SAIC,


Why SQL Agent is used?

0 Answers   Abacus,


Categories