SQL Interview Questions and answers Part 47 |SQL Scenario based Interview Question and Answer

preview_player
Показать описание
Do Like 👍👍, Comment & Subscribe

SQL Interview Questions and answers :
Problem Statement :- For the 2021 academic year, students have appeared in the SSC exam. Write a SQL query to calculate the percentage of results using the best of the five rule i.e. You must take the top five grades for each student and calculate the percentage.

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

*Twitter:
-------------------------------------------------------------------------
Table and Insert SQL Script :
-------------------------------------------------------------------------
create table SSC_Exam (
Id int,
English int,
Maths int,
Science int,
Geography int,
History int,
Sanskrit int)

Insert into SSC_Exam Values (1,85,99,92,86,86,99)
Insert into SSC_Exam Values (2,81,82,83,86,95,96)
Insert into SSC_Exam Values (3,76,55,76,76,56,76)
Insert into SSC_Exam Values (4,84,84,84,84,84,84)
Insert into SSC_Exam Values (5,83,99,45,88,75,90)

#SQL #SQLInterviewQuestionsandanswers #sqlInterviewQuestions #sqlInterviewQuestionsForTesting
Рекомендации по теме
Комментарии
Автор

Finally completed this series till here. I wanna say that, these playlist comprises quality scenario based questions. Thank you so much for this ❤️

quadirnawaz
Автор

I hope, you're gonna continue this series in future as well. Looking forward for more such questions. I'll recommend this channel to all my colleagues ❤️

quadirnawaz
Автор

All ur videos are really interesting 👌

shakiraafshan
Автор

Superb, i would say after going through so many questions of yours finally, I am able to crack some critical questions and many a time the procedure is just the same as you suggest.. 😀thank you for sharing all this content! really helps.. Cheers!!

akashgoel
Автор

One doubt sir.
It may be a silly one
cast(sum(Marks)/500.0 as Float)*100 as Percentage---getting the expected percentage values
but cast(sum(Marks)/500 as Float)*100 as Percentage---getting the percentage value as 0

if we are not putting 500.0 and just 500 getting '0’
Could u please clarify this
Thanks in advance

ashokrajann
Автор

hi sunil
please answer this quesion it's an interview question
will SQL server use non clustered index every time?
i checked a sample data
create table named(id int, name varchar(10))
insert into nameid values('abc', 1)
go
insert into nameid values('def', 1)
go 10

create nonclustered index ix_check on nameid(name)

select top 10 * from nameid where name = 'abc'
for above query its not using non clustered index when checked in execution plan but I didn't understand why its not using while working on bulk data? infact when data is huge that's when we need index right? instead here while working on 10 records it used index and didn't use while working with records

shakiraafshan
Автор

I try to write on the correct video but i don t see my comment so-can i have pls your email to send that problem?Thank you

florincopaci