PC(code, model, speed, ram, hd, cd, price)
Find the hard drive sizes that are equal among two or more
PCs.



Answers were Sorted based on User's Feedback



PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or mo..

Answer / sandeep

Select hd from PC
Group by hd
having count(hd)<>1

Is This Answer Correct ?    16 Yes 1 No

PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or mo..

Answer / cullen

Select hd from PC
Group by hd
having count(*)>=2

Is This Answer Correct ?    4 Yes 0 No

PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or mo..

Answer / piko1989

Select distinct hd
from pc
GROUP BY hd
having count(hd)>=2

Is This Answer Correct ?    1 Yes 0 No

PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or mo..

Answer / alci

Select hd
from PC
group by hd
having count(hd)>1

Is This Answer Correct ?    1 Yes 0 No

PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or mo..

Answer / rafal

select hd
from PC
group by hd having count(model) >= 2

Is This Answer Correct ?    0 Yes 0 No

PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or mo..

Answer / guest

Select * from PC
group by hd
having count(*)>1

Is This Answer Correct ?    6 Yes 7 No

Post New Answer

More SQL Server Interview Questions

How to get a list of table columns using the "sp_columns" stored procedure in ms sql server?

1 Answers  


How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

1 Answers   IBM,


How to configure and test odbc dsn settings?

1 Answers  


How to concatenate two binary strings together?

1 Answers  


What is exporting and importing utility?

1 Answers  


How to handle errors in Stored Procedures. I want to display a message to the user in the .aspx page that is calling a stored procedure in it's code behind. please help me.

2 Answers   247Customer,


what are triggers? : Sql server database administration

1 Answers  


Explain indexes disadvantages?

1 Answers  


What is the use of for clause?

1 Answers  


One table Test with single column. These are the values in the table a b c d e f g h I need a query (without using any variable) with output as - a b c d f f g h

1 Answers  


What is self contained sub query?

0 Answers  


Where are full-text indexes stored?

1 Answers  


Categories