10 SQL Interview Queries | SQL Queries for experienced | Important SQL queries

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 75

  • @jeremmoses8562
    @jeremmoses8562 3 ปีที่แล้ว +9

    Wow, watched fully and had covered all basic needed things, I recommend everyone to watch if you are looking for a revision of basic SQL functions. Thank you Cherry Academy

  • @ramakrishnathota2996
    @ramakrishnathota2996 2 ปีที่แล้ว +1

    super finally i got the good video on sql interview questions

  • @kiranraj6323
    @kiranraj6323 3 ปีที่แล้ว +5

    need more video like this

  • @kumarswamy6940
    @kumarswamy6940 2 ปีที่แล้ว +1

    Excellent work u done on Queries thank you bro

  • @lilyfullery4779
    @lilyfullery4779 2 ปีที่แล้ว

    4th question ans ,
    -- i find this ans very easy for getting any rank of the salary as we want.
    select * from(
    select * , dense_rank() over(order by salary desc) rank from bemployee) s
    where rank = 2

  • @sandipdas3628
    @sandipdas3628 3 ปีที่แล้ว +1

    Great, I have one more query to find Nth sal.
    SELECT ID, NAME, SALARY FROM EMPLOYEE A WHERE N - 1 = (SELECT COUNT(1) FROM EMPLOYEE B WHERE B.SALARY > A.SALARY)
    In place of N , we can put values we want to find out , for 3rd highest we can put 3 .. Happy learning :)

  • @manateluguinamerica5299
    @manateluguinamerica5299 2 ปีที่แล้ว

    So informative and explained precisely. Need more videos on Pl Sql tricky questions

  • @mendemende8539
    @mendemende8539 2 ปีที่แล้ว

    Well done! Crystal clear explanation thank you sir!

  • @sivatheja605
    @sivatheja605 3 ปีที่แล้ว

    Nice video
    it helps a lot to understand basics of SQL queries
    Thank you @cherry academy

  • @mixture6822
    @mixture6822 2 ปีที่แล้ว

    Thank you...nice and simple explanation

  • @KalyanS
    @KalyanS 2 ปีที่แล้ว

    Excellent presentation. appreciate your efforts.

  • @ArunKumar-jh4qe
    @ArunKumar-jh4qe 3 ปีที่แล้ว +4

    plz make more vedios on sql questions

    • @OracleLand_Official
      @OracleLand_Official 3 ปีที่แล้ว +1

      Watch full interview questions on Sql here....

  • @farannafis7042
    @farannafis7042 2 ปีที่แล้ว

    Thanks

  • @abdullahyahya2471
    @abdullahyahya2471 2 ปีที่แล้ว

    Kudos to you.. You provided the links in description.. Thanks.

  • @snowguo1786
    @snowguo1786 2 ปีที่แล้ว

    Thank you, all of these are what I expected! No need to watch again, but this is good.

  • @ganeshbaviskar3974
    @ganeshbaviskar3974 2 ปีที่แล้ว

    Good sir 👍thank you

  • @ramakrishnasamala4201
    @ramakrishnasamala4201 2 ปีที่แล้ว

    very helpful video. Thank you

  • @saipraneeth1660
    @saipraneeth1660 2 ปีที่แล้ว

    Nice video.. Can you please make more videos ON SQL Interview based questions

  • @venkymokkarala7677
    @venkymokkarala7677 3 ปีที่แล้ว +2

    Excellent explanation 👌👌 we need more videos 👍

  • @naresh8879
    @naresh8879 11 หลายเดือนก่อน

    Using Row_number to identify the nth highest salary is not ideal because when 2 or more emps having salary will not return correct output. Using Dense rank instead of row number is ideal.

  • @ashwathikrishnan
    @ashwathikrishnan 3 ปีที่แล้ว +4

    Hi there,
    Great explanation. I had a query though. The last line of DELETE statement is deleting the record from cte. How does it impact the duplicate record in the actual table (tblEmployee)?
    I thought CTE only existed within the query.

    • @cherryacademy7692
      @cherryacademy7692  3 ปีที่แล้ว +4

      Hi, Yes you are right, the delete query will delete the duplicates from the CTE only. It is my bad. We can use the below query to delete duplicates from the table using Rank function and also it needs a unique Id column, here I am using EmpId to achieve this.
      DELETE E
      FROM tblEmployee E
      INNER JOIN
      (
      SELECT *,
      RANK() OVER(PARTITION BY EmpName,Salary
      ORDER BY EmpId) rank
      FROM tblEmployee
      ) T ON E.EmpId = t.EmpId
      WHERE rank > 1;

    • @learnlife8055
      @learnlife8055 3 ปีที่แล้ว

      @@cherryacademy7692 Hi there, I have a doubt that needs a clarification. will the above query using rank and rank>1 actually delete the duplicate? How about the below one
      DELETE T FROM (
      SELECT *, ROW_NUMBER() OVER (PARTITION BY EmpName,Salary ORDER BY EmpId) as [RN] FROM tblEmployee
      ) AS t WHERE RN > 1
      Thanks a lot

    • @ashwathikrishnan
      @ashwathikrishnan 3 ปีที่แล้ว

      @@cherryacademy7692 Thank you!

    • @sahej97
      @sahej97 3 ปีที่แล้ว

      @@cherryacademy7692 query looks incorrect

    • @Anonymous-cj4gy
      @Anonymous-cj4gy 3 ปีที่แล้ว +2

      even if you delete from the CTE table, it will delete the records from the original table only. I have tried it and it is working.
      with cte as
      (
      select EmployeeId, ROW_NUMBER() over(partition by employeeid order by employeeid) as rno
      from emp_duplicate
      )
      delete from cte where rno>1

  • @davidlivingston3894
    @davidlivingston3894 3 ปีที่แล้ว

    Quick Review for Sql stuffs. Thanks. Would you post some videos of c#

  • @sabarijiva6148
    @sabarijiva6148 2 ปีที่แล้ว

    Hi ..please upload more videos regarding SQL and c#..this video is good..

  • @kirubababu7127
    @kirubababu7127 3 ปีที่แล้ว +4

    I have a question on
    2)
    We are deleting from 'CTE' temp table but how it is reflecting emp table?

    • @rohanwagh3420
      @rohanwagh3420 2 ปีที่แล้ว

      nothing is going to reflect

  • @santhitammana4201
    @santhitammana4201 2 ปีที่แล้ว

    This video is very helpful to me. Can you upload about user define functions

  • @theraizadatalks14
    @theraizadatalks14 2 ปีที่แล้ว

    Wow, a great video with quality question. Looking forward to more such advanced level questions ❤️

  • @arnabroy2995
    @arnabroy2995 2 ปีที่แล้ว

    You have really done well. sums up almost everything that can come in interview. I really do appreciate your effort. :-)

  • @ganeshhargude8028
    @ganeshhargude8028 3 ปีที่แล้ว

    Very nice query & presentation

  • @sallubhaiproductions3558
    @sallubhaiproductions3558 2 ปีที่แล้ว

    Simple awesome

  • @vipinreddy9053
    @vipinreddy9053 2 ปีที่แล้ว

    Hi, Thanks for this video!! I have a question - what if we have a table of more than 100 columns and if we want to find duplicate records, like here in this case we assumed we wont find more than one record with same empname and salary and that's why we selected those columns in group by, but in the case of 100 columns , how to select columns to put into group by?

  • @sameervishwakarma4719
    @sameervishwakarma4719 2 ปีที่แล้ว

    Nice Video

  • @SarajSadanand
    @SarajSadanand 2 ปีที่แล้ว

    Thank, that was helpful!! I was looking for this: find 3rd largest salary from each dept, could you try that...

  • @Step2learn
    @Step2learn 3 ปีที่แล้ว

    very usefull bro expecting more videos like this bro

  • @sandippatil4368
    @sandippatil4368 4 ปีที่แล้ว +1

    Nice bro all queries 👍

  • @alankarthik5044
    @alankarthik5044 4 ปีที่แล้ว

    queries provided in the video are great, really helpful, thank you

  • @mohammedaasem1574
    @mohammedaasem1574 3 ปีที่แล้ว

    So helpful

  • @AruLcomments
    @AruLcomments 3 ปีที่แล้ว +1

    The background music is distracting. But the video is good. In your next video if you remove the music could be great

  • @aknanda226
    @aknanda226 3 ปีที่แล้ว +1

    Great explanations and it will help everyone, thank you so much for your effort!!

    • @cherryacademy7692
      @cherryacademy7692  3 ปีที่แล้ว

      We are happy to hear from you. Thank you for the valuable feedback 🙏

  • @ankursharma6084
    @ankursharma6084 2 ปีที่แล้ว

    True Legend

  • @ParthaDas-ym1mn
    @ParthaDas-ym1mn 3 ปีที่แล้ว

    Hi, Could you please make a video related to tricky date functions and trigger functions for SQL

  • @yashjain6667
    @yashjain6667 3 ปีที่แล้ว

    Thank you

  • @namratanagvekar6857
    @namratanagvekar6857 3 ปีที่แล้ว

    good job bro

  • @siddanth4353
    @siddanth4353 3 ปีที่แล้ว

    how do you use top while selecting top n salaries. it is throwing an error that top cannot be used anymore.

  • @GOWTHAMGS-vz7rd
    @GOWTHAMGS-vz7rd ปีที่แล้ว

    Ms sql course i possibly to add

  • @adelinorafailov233
    @adelinorafailov233 2 ปีที่แล้ว

    where exactly is the data and how to upload it? in the link given there are only pdfs and some instructions, help me

  • @abhinavsingh4208
    @abhinavsingh4208 3 ปีที่แล้ว

    This video was very helpful Thankyou !!

  • @Priyanka-us8rw
    @Priyanka-us8rw 2 ปีที่แล้ว

    Hi, I can't crack sql queries questions in interview. What to do?how to do practice?

    • @cherryacademy7692
      @cherryacademy7692  2 ปีที่แล้ว +1

      Hello Priyanka, not just for you, generally, most of the people including me fail to write queries on the spot. It doesn't mean you are not good. Interviews are spontaneous and mostly theory-based.
      To improve:
      Whenever you attend an interview, note down the questions/queries that are asked, prepare answers and practice them. Over a period of time, you will become familiar with the queries that are asked.
      If you need further support, please connect with me in linkedin
      www.linkedin.com/in/james-fredric-631139141/

  • @shafiquek9960
    @shafiquek9960 3 ปีที่แล้ว

    Thanks bro for sharing your knowledge. Definitely it will help a lot to most of us. :-)

  • @harshareddy753
    @harshareddy753 3 ปีที่แล้ว

    Where are that tables to create and insert ...is there source code for this

  • @venkieedonthoju1150
    @venkieedonthoju1150 2 ปีที่แล้ว

    Hey hai
    Column names
    " empid,empname,empsalary,department,"
    Who draw the hight salary based on the department, department are ( it,hr, manager,admin) based on this I want two maximum salaries for each department. how could u write the queary plase let me now.

  • @appasahebneelawani143
    @appasahebneelawani143 3 ปีที่แล้ว

    From mobile phone we are not able see the query bcz font is very small

  • @madhusudhanreddy-s6q
    @madhusudhanreddy-s6q หลายเดือนก่อน

    the video is good , but the background sound is worst

  • @theotherside3351
    @theotherside3351 3 ปีที่แล้ว

    Which JOIN is used in the last question? Is it SELF JOIN?

    • @smartcuteperson8701
      @smartcuteperson8701 3 ปีที่แล้ว

      No we can use self join also

    • @learnlife8055
      @learnlife8055 3 ปีที่แล้ว

      The departmen having less than 3 emp? => that was inner join

  • @ankitac4994
    @ankitac4994 2 ปีที่แล้ว

    Easy questions explained with tough answers❌❌

    • @cherryacademy7692
      @cherryacademy7692  2 ปีที่แล้ว

      Thank you for the feedback, we will put more efforts to improve in our subsequent videos.

  • @ankurvats4586
    @ankurvats4586 2 ปีที่แล้ว

    ye background music is so much disturbing and annoying

  • @yallababus3497
    @yallababus3497 3 ปีที่แล้ว

    worest explanation for nth and top not worh to watch

    • @cherryacademy7692
      @cherryacademy7692  2 ปีที่แล้ว

      Thank you for the feedback brother, we will try to improve in the upcoming videos