SQL Interview Questions And Answers Part 61 | SQL questions for Product based companies

Опубликовано: 28 Сентябрь 2024
на канале: ItJunction4all
2,629
79

SQL Interview Questions And Answers Part 61

This question has been asked in many company and it will be helpful in cracking any SQL interview
Problem Statement : Device Table consists of Device_id and Locations.
Write a SQL query to get the output as shown in video :-

-------------------------------------------------------------------------
𝗝𝗼𝗶𝗻 𝗺𝗲 𝗼𝗻 𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:🔥
-------------------------------------------------------------------------
*Instagram :
  / itjunction4all  

*Twitter:
  / sunilkr5672  
-------------------------------------------------------------------------
Table and Insert SQL Script :
-------------------------------------------------------------------------
Create Table Device(
Device_id int,
Locations Varchar(25)
)

Insert into Device (Device_id,Locations) values
(12,'Bangalore'),
(12,'Bangalore'),
(12,'Bangalore'),
(12,'Bangalore'),
(12,'Hosur'),
(12,'Hosur'),
(13,'Hyderabad'),
(13,'Hyderabad'),
(13, 'Secunderabad'),
(13, 'Secunderabad'),
(13, 'Secunderabad')


#WALMARTInterview #FAANG #SQLInterviewQuestionsandanswers #sqlInterviewQuestions #MAANG #sqlInterviewQuestionsForTesting