Solve SQL Interview Questions for Data Analyst - Product Based Company Job Interview

Поделиться
HTML-код
  • Опубликовано: 30 мар 2023
  • Solve SQL Interview Questions for Data Analyst - Product Based Company Job Interview
    Hi folks, this question is asked many times by the product based companies for data analyst job role.
    🔖Download SQL Interview Q&A PDF: bit.ly/3M7YHxJ
    👍Subscribe Now: bit.ly/3Fc7Gc6
    👉Instagram: / rishabhnmishra
    ➖➖➖➖➖➖➖➖➖➖➖➖➖
    Q1: Create match table:
    CREATE TABLE match ( team varchar(20) )
    INSERT INTO match (team) VALUES ('India'), ('Pak'), ('Aus'), ('Eng')
    Q2: Create emp table:
    CREATE TABLE emp ( ID int, NAME varchar(10) )
    INSERT INTO emp (ID, NAME)
    VALUES (1,'Emp1'), (2,'Emp2'), (3,'Emp3'), (4,'Emp4'),
    (5,'Emp5'), (6,'Emp6'), (7,'Emp7'), (8,'Emp8')
    ➖➖➖➖➖➖➖➖➖➖➖➖➖
    More SQL for data science Videos:
    📢Full SQL Tutorial in One Video: • SQL Tutorial for Begin...
    🔖 Top SQL Interview Questions and Answers: • Top SQL interview Ques...
    🔖Most Asked SQL Interview Question: • Most Asked SQL Intervi...
    🔖SQL Tutorial Playlist: • SQL Tutorial In Hindi
    ➖➖➖➖➖➖➖➖➖➖➖➖➖
    📣Want to connect with me? Check out these links:📣
    👉Instagram: / rishabhnmishra
    👉LinkedIn: / rishabhnmishra
    👉Twitter: / rishabhnmishra
    ➖➖➖➖➖➖➖➖➖➖➖➖➖
    More Related Videos:
    📢Full Excel Tutorial in one Video: • Excel Tutorial For Beg...
    🔖Excel Tutorial Playlist: • Excel for Beginners | ...
    🔖Complete Data Analyst Roadmap: • How to Become Data Ana...
    🔖Data Analyst Roadmap, Skills and Jobs: • Data Analyst- Skills, ...
    🔖What Does a Data Analyst Actually Do?: • What Does a Data Analy...
    ➖➖➖➖➖➖➖➖➖➖➖➖➖
    Hope you liked this video and learned something new :)
    See you in next video, until then Bye-Bye!
    Pls ignore
    SQL Interview Question
    SQL Interview Questions and Answers
    SQL Interview Questions
    Sql interview query
    advance sql query
    sql for data analyst
    sql question query
    SQL Interview Questions Answers
    Mostly asked SQL Interview Questions Answer
    Commonly asked SQL Interview Questions Answer
    SQL Command Based Interview Questions Answer
    Advanced SQL Interview Questions Answer
    Top 10 SQL Interview Questions Answer
    SQL Interview Questions SQL Interview Questions and answers for Freshers and Experienced
    Top 10 SQL Interview Questions Answer
    SQL Interview Questions Answer
    SQL Interview
    SQL Interview Questions for freshers
    SQL Interview Questions and answers for freshers
    SQL Roadmap
    SQL Interview Questions 2023
    SQL Interview Experience Interview questions for SQL Experienced

Комментарии • 144

  • @hassamulhaq7762
    @hassamulhaq7762 Год назад +4

    I figure out here I need a self-join, windows function, and where clause to solve this query, but I didn't know about CTE. Thanks for such tutorials.

  • @rithikahuja8203
    @rithikahuja8203 Год назад +2

    Reallt helpful Rishab bhaiya keep going ❤❤

  • @user-wu5zo1th5o
    @user-wu5zo1th5o 8 месяцев назад

    u done a very good and helpful job bhai. we need like u more skilled people to India. Thanks

  • @amitgajkal4821
    @amitgajkal4821 Месяц назад +1

    Round robin calculation (number of matches played without any repetition) = n*(n-1)/2
    select a.team team_A, b.team team_B from match a
    join match b
    on a.team b.team
    where a.team < b.team
    order by team_A
    above also give same output without using CTE and window function.

  • @inshortview
    @inshortview Год назад +1

    Learning in own pace
    Thankyou Bhaiya

  • @shreekantgosavi4726
    @shreekantgosavi4726 Год назад +2

    This is really Helpful

  • @ashishsrivastav11111
    @ashishsrivastav11111 Год назад +1

    Phle row number daal diya..order by asc in over clause....stored in cte table...than magic happens with self join....where a. Id b.id and a.id < b.id❤

  • @swapnilpalsapure9781
    @swapnilpalsapure9781 Месяц назад +1

    Very well explained

  • @niladribiswas7667
    @niladribiswas7667 Год назад +1

    Thank you sir for the vdo ❤

  • @sushantmeshram5172
    @sushantmeshram5172 Месяц назад +1

    thank you so much Rishab!

  • @Tradesetup18
    @Tradesetup18 Год назад +1

    thank you sir❣
    looking for more videos

  • @susamay
    @susamay Год назад +13

    Please keep going like this. Don't loose motivation if these videos doesn't get reach immediately, eventually someone like me will discover your channel in near future and keep coming to your channel for all the videos. Just keep at it

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад +3

      Thank you for your kind words 👍

    • @SN-ec1xi
      @SN-ec1xi 3 месяца назад

      ​@@RishabhMishraOfficial please post more videos of QnA and more project videos ..
      Also please let us know how to escape the boredom while preparing

  • @realfacts3517
    @realfacts3517 Год назад +2

    Thank you Sir!

  • @neenanazar5637
    @neenanazar5637 Год назад +6

    Hi Sir..was waiting for this video..completed full sql course ,sql portfolio watching your channel.created my portfolio and uploaded full script in github

  • @architaroy660
    @architaroy660 Год назад +13

    Waiting for part 3

    • @Ankurkumar-yt4oo
      @Ankurkumar-yt4oo Год назад +1

      Looking to build up connection as a data analyst aspirant ..

  • @zeeshanraza1393
    @zeeshanraza1393 Год назад +2

    Rishab Bhaiya plz plz plz next video Data Analyst Interview Preparation Plus Preparation Resources Prr Bnao jesy app nyy Data Analyst Road Map Plus Unky Resources prr bnai the

  • @rishav144
    @rishav144 Год назад +6

    Thanks bro ...Ek End to End Python Data Analysis project lao pls

  • @user-oz2yz4wp8q
    @user-oz2yz4wp8q Год назад

    Nice informative videos!! Thank you :) Just a thought: your language and face reminds me Indian cricket captain Rohit Sharma :)

  • @pushpendrakumar417
    @pushpendrakumar417 Год назад +2

    HI RISHABH YOUR TECHING METHOD IS AWESOME THEN OTHERS
    I WANT TO LEARN FULL AZURE DATA ENGINEER COURSE PLEASE SUGGEST ME , WILL YOU PROVIDE ONLINE FOR THE SAME.

  • @anandgaurav-om9ot
    @anandgaurav-om9ot Год назад +1

    Thanku sir for clear Understanding 🙏

  • @zeeshanraza1393
    @zeeshanraza1393 Год назад +1

    Rishabb Bhai Plzzzzzzzzzzzzzzzzzzzzzzzz Next Video Data Analyst Preparation Plus Resources Prr anii chayee tk hum easily koi be Company Crack Kr Payen

  • @vinitshirke7032
    @vinitshirke7032 Год назад +1

    Sir pls course on tableau u r sql course really helped pls 🙏 sir

  • @anuandaarushow8300
    @anuandaarushow8300 Год назад +1

    Hello sir. I m sanjita. From past few days I m following you and watching your videos. All your videos are amazing and covers all important topics. Do you provide any certificate so that we could add that in our resume for getting a good job. I m from non tech background but now I want to do data analytics course. I will be very thankful if you give me all the information. Thanks

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад +2

      No i don't provide any certificates, only projects n basic skills to learn n practice data analytics skills

  • @bishtji-em2zt
    @bishtji-em2zt Год назад +1

    Bhai aap great ho

  • @de_vasu
    @de_vasu Год назад +1

    Please do continue this session learned a lot

  • @Tokyo_17
    @Tokyo_17 Год назад +1

    can you please make a video on power query

  • @mysoresairam5750
    @mysoresairam5750 Год назад +1

    excellent content🤩

  • @basavannimattikatti5790
    @basavannimattikatti5790 Год назад

    Hi sir,i have completed data analyst course,i want to do projects..can you suggest ,how can we work on real time data and projects?

  • @sourabhsingh4236
    @sourabhsingh4236 9 месяцев назад

    In interviews, do we need to answers verbally or they give us system for answer.

  • @saumyajoshi-ym2os
    @saumyajoshi-ym2os Год назад +4

    Sir leetcode SQL questions enough for product based company? And please make a roadmap for data analyst preparation and resources product based company
    Bcoz you are genius except few people like you rest of the channels guide to learn DSA specially when you work on technology after the interview but in data analyst we do the sem work what we prepare for interview

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад

      Do leetcode questions n work on good industry level projects. For data analyst roles we don't need DSA as a freshers

    • @saumyajoshi-ym2os
      @saumyajoshi-ym2os Год назад +2

      @@RishabhMishraOfficialplease share your experience about the practical work challenges as a fresher after getting the data analyst job and what kind of training you got and the client expectations you know bcoz mass recruiters hires in bulk then they train in different technologies and project in different technologies and so on

  • @Freakouts_and_found_Insane
    @Freakouts_and_found_Insane Год назад

    2 Query asked in interview-
    Other way of solving is
    Concate Both columns
    Then using Rownumber function get even and odd I'd from the table then union them

  • @hRvlogs921
    @hRvlogs921 Год назад +1

    Hi Sir,
    please make a video about the projects to be included in our resume while applying for data analyst as a fresher.

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад +2

      Noted ✅️

    • @ishikasingh8693
      @ishikasingh8693 6 месяцев назад

      Hello! I appreciate your work. I want to ask you one thing to learning or solving sql query how much maths needs to be required?

  • @devashishdeshmukh2180
    @devashishdeshmukh2180 Год назад

    Great content sir ! Apart from topic i have question for you why do you switch from digital marketing . Is not worth it . Can explain pro & cons of industry . & Lil bit future prospect of Digital marketing. As ai coming to the picture

  • @gkapadi9831
    @gkapadi9831 16 дней назад

    Select a.team as team_A,b.team as team_b from match a,match b where a.team>b.team and a.teamb.team

  • @dearhraman
    @dearhraman Год назад

    Šir į have one question
    Path learning python for data analytics

  • @utkarshgarg7342
    @utkarshgarg7342 Год назад

    Sir I want to ssis aur ssms mai kya difference hai aur data analyst bane ke liye ana chahiye

  • @saianshvlogs6452
    @saianshvlogs6452 Год назад +7

    main khudd data analyst hun but kaffi sari chize hai jo abhi mujhe nhi pta hai to me ye samjh paa rhi hun ki kai logo ko isme bhi problem hoti hai ki resum me kyq kya update kre or project details me kya likhe job kaise milegi

  • @jatinsinghtomar4027
    @jatinsinghtomar4027 Год назад

    Sir I m cllg student so aap bata skte h data analyst me salary zada h ya Java backend me salary zada h or konsa sikhna chahiye

  • @ranjeetsk4043
    @ranjeetsk4043 6 месяцев назад

    Match question me oh join is not required, just use where conditions a. I'd less than b. I'd. That's more than Enough

  • @gauravverma7985
    @gauravverma7985 Год назад

    Hi rishabh I'm beginner in power Bi can you please help i installed it but in the right side of sheet visualization panel is not showing also the other panels like data only filter thing appears can you tell how to fix it? Pleaseeee helpppppp

  • @googlechannel3664
    @googlechannel3664 10 месяцев назад +1

    sir,mysql benchmark,it dont have string__agg function ,is there any option to solve

  • @kunalkalal494
    @kunalkalal494 Год назад

    Hello rishab sir Plz help how to use TCL .type means commit & save point in SQL server Plz sir

  • @adityawasankar7929
    @adityawasankar7929 Год назад +1

    Rishabh bhai please make project video on Tableau

  • @aasthasinghal9668
    @aasthasinghal9668 2 месяца назад

    Video is really helpful but the maths part in Q1 is not clear, it is confusing, we don't know why r =2 , it'd be great if you could explain that.

  • @pm-kj9lv
    @pm-kj9lv Год назад

    I started sql with theory I want to know how to practice it .plz let me know

  • @bushrasafi1966
    @bushrasafi1966 8 месяцев назад

    Hello sir I want to take admission of database administrator, for sql does my math needs to be good or math is not required??

  • @shubhambhosale8467
    @shubhambhosale8467 9 месяцев назад +1

    create for 30 days python challenge pdf with hackerrank problem will be very helpfull same as sql sheet

  • @anuragpant2632
    @anuragpant2632 10 месяцев назад

    Help to build portfolio how to add sal project on portfolio plz tel

  • @sukritisachan5773
    @sukritisachan5773 Год назад +1

    In 1st table match one can we not include an extra column as a primary key?

  • @paressh
    @paressh Год назад

    Voice is enough.

  • @HarshitJain-mc8gn
    @HarshitJain-mc8gn Год назад +1

    One more solutions using 3 CTE's. Little complex than the smarter solution u mentioned.
    WITH CTE AS (
    SELECT A.NAME AS TEAM1, B.NAME AS TEAM2
    FROM TEAMS AS A
    CROSS JOIN TEAMS AS B
    ),
    CTE_2 AS (
    SELECT *
    FROM CTE
    WHERE TEAM1 TEAM2
    ),
    CTE_3 AS (
    SELECT GREATEST(TEAM1, TEAM2) AS FIRST, LEAST(TEAM1, TEAM2) AS SECOND
    FROM CTE_2
    )
    SELECT DISTINCT *
    FROM CTE_3
    ORDER BY SECOND;

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад

      If it works it good 👍

    • @emu9991
      @emu9991 8 месяцев назад

      bahi itna complex likhoge to khud hi phas jaaoge....keep code as simple as possible.......

  • @himanshurai7881
    @himanshurai7881 Год назад +2

    Which one is most demanding for a job.?
    MySQL, MS SQL, postgresql

  • @piyushgupta5044
    @piyushgupta5044 Год назад +1

    Sir, plz make the videos on solution of sql queries of leetcode

  • @STATUSSHUBHAM
    @STATUSSHUBHAM 2 месяца назад

    Aap apna khud ka data analytics course karate hai kya bhaiya mujhe sikhna hai data analytics aapse live batch hai kya

  • @day2daylifethings
    @day2daylifethings Год назад +1

    Sir....sql 2.5hr wala srt Kiya Hai abhi....your way of explanation is very nice.....but sir Kuchipudi doubts aaye toh kaise contact Krein aapko

  • @srushtiOm
    @srushtiOm Месяц назад

    With cte as
    (Select *, lead(team,1) over (order by (select null)) as Tab_1
    from match
    union
    select *, lead(team,2) over (order by (select null)) as Tab_1
    from match
    union
    select *, lead(team,3) over (order by (select null)) as Tab_1
    from match)
    Select * from cte where Tab_1 is not null
    Is this solution valid for Q1? The sequence is not the same. But results are more or less the same. Do let me know. Thanks!

  • @itxrocky4566
    @itxrocky4566 Месяц назад

    is it Last video of this series??

  • @harshpandya9046
    @harshpandya9046 Год назад +1

    Sir ek video banai jis mai Business analyst wala ko kitna SQL aana chahiye please

  • @aparupmukherjee4954
    @aparupmukherjee4954 Год назад +1

    Do you provide any courses for power BI ?

  • @AshaSharma-sd4jb
    @AshaSharma-sd4jb Год назад +2

    Sir mere English Communication week hai
    To muje interview me Problem hoga kya Data analysis role ke leye

  • @susheelkharat5122
    @susheelkharat5122 Год назад +1

    Sir could please tell me that, excel's which vba macros are used for data analytics

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад

      Check the data analyst roadmap video, hv shared all the details there along with free resources

    • @susheelkharat5122
      @susheelkharat5122 Год назад

      @@RishabhMishraOfficial Thanks brother, watched full video of roadmap and I got full knowledge of it. I will implement it.

  • @Zain.263
    @Zain.263 Год назад +1

    Bhai if someone has less understanding of maths concepts , can he/she do data analyst job ?

  • @Alex_499
    @Alex_499 Год назад +1

    i have an interview today for sql developer but i dont have practical knowledge about complex queries .'😢 should i go for interview or not

  • @DharmendraKumar-DS
    @DharmendraKumar-DS Год назад +1

    I have a question, when you completed your sql for the first time, were you able to solve all these problems without any help??...because I have learned sql but sill get confused while solving these kind of problems.

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад

      No.. i did practice first then i tried some advanced level questions. After that i was able to solve it 👍

  • @bhavinpadhiyar9829
    @bhavinpadhiyar9829 4 месяца назад +1

    Thank you, Rishabh for this video!! It would be helpful if you provide sample interview questions for Python also!!

  • @saianshvlogs6452
    @saianshvlogs6452 Год назад +1

    aap data analyst students ki itni help kr rhe but aap ek or help kriye sabhi data analyst ki
    LinkedIn me data analyst valo ko kya kya update kre ko vo job ke liye select ho or resume me bhi kya kya update kre kyu ki abhi tk ini details me koi bhi nhi bataya hai aap batao or video bhi banao

  • @funvideoscorner
    @funvideoscorner 4 месяца назад

    Rishabh Mishra There is a error in your database file its not working

  • @vishalsonawane.8905
    @vishalsonawane.8905 2 месяца назад

    How is it r= 2 ?

  • @jagveersingh8458
    @jagveersingh8458 Год назад +1

    Please launch a course on sql

  • @shubhampardeshi2873
    @shubhampardeshi2873 Год назад +1

    Sir data science ka course krke job mill skti hai na...diploma basis pr

  • @axardave5775
    @axardave5775 Год назад

    bro would you like to train me by online classes?

  • @poojasonavane
    @poojasonavane Год назад +1

    Is this necessary to learn to be a business analystics ??

  • @chandrashekharmishra9521
    @chandrashekharmishra9521 Год назад +1

    सब कुछ सीखने के बाद सबसे बड़ी समस्या है, जॉब के लिए intervew/apply/ रेफरल प्राप्त करना,कैसे इंटरवेव के लिए अप्लाई करें।यदि कुछ इसका तरीका हो तो प्लीज बताइए

  • @punjabifashionworld
    @punjabifashionworld Год назад

    Data analytics mein job k liye apply kon kon kr skta hai sir reply jrur karna?

  • @addicted4253
    @addicted4253 Год назад +1

    Is this for Freshers?

  • @SachinSingh9616
    @SachinSingh9616 9 месяцев назад

    There is no job for freshers in market

  • @neetufabiyani9137
    @neetufabiyani9137 Год назад +1

    why is r=2? can u please explain me

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад

      Already explained in the video 🤦‍♂️
      n = 4 bcoz we have 4 teams
      And r = 2 bcoz there will be a match btw 2 teams

    • @neetufabiyani9137
      @neetufabiyani9137 Год назад

      @@RishabhMishraOfficial thanks

  • @paressh
    @paressh Год назад

    One request just hide yourself.

  • @unfortunately_but_engineer9207
    @unfortunately_but_engineer9207 9 месяцев назад +1

    For 2nd question we can also use this soln:
    select CONCAT(id_name,',',lead)as Result,
    row_number() over (order by id) as groups
    from (select *,
    lead(id_name,1) over (order by id)as lead
    from(Select *,CONCAT(id,' ',name)as id_name
    from employee) a)b
    where id%2 0

  • @sipunkumar9578
    @sipunkumar9578 Год назад +1

    Sir data analyst ke liye konsa chahiye btech me
    •computer science engineering
    •computer science AI
    •computer science engineering and artificial intelligence
    •computer science engineering and data science

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Год назад

      Koi bhi branch se karlo but skills are important aur vo tumko apne aap se sikhna hoga

  • @optiongreeks_265
    @optiongreeks_265 9 месяцев назад

    On serious note you need to speak slow really difficult to understand to a person like me whose understanding compiler runs slow

  • @nikhil4062
    @nikhil4062 9 месяцев назад

    WITH cte_new AS (
    Select *,ROW_NUMBER() OVER(ORDER BY team ASC) from matches
    )
    I am trying this query for cte but it is giving me error in my sql , can anyone tell why so?

  • @InnovationInflux
    @InnovationInflux Месяц назад +1

    Can also use the below when you dont know the number of rows.
    '''Lead is used the get the next row'''
    WITH CTE_Temp AS
    (
    SELECT employee_id, name,
    LEAD(employee_id) OVER (ORDER BY employee_id) AS next_id,
    LEAD(name) OVER (ORDER BY employee_id) AS next_name
    FROM employee
    )
    Select employee_id, CONCAT(employee_id,', ', name,', ', next_id,', ', next_name) from CTE_Temp
    where next_name IS NOT NULL

  • @arpiteshsrivastava9838
    @arpiteshsrivastava9838 7 месяцев назад +1

    Note - In MySQL STRING_AGG is not supported. Alternative is to use GROUP_CONCAT.
    with cte as
    (select *,
    concat(id, ' ', name) as con,
    ntile(4) over(order by id) as rn
    from emp_1)
    select group_concat(con separator ', ') as result, rn as 'groups'
    from cte group by rn;
    Thanks Rishabh.

  • @satyamdashora2489
    @satyamdashora2489 11 месяцев назад +1

  • @chakeriancrew9189
    @chakeriancrew9189 Год назад +1

    Bro how can I contact you i wannt advice from you

  • @knowledgeispower9662
    @knowledgeispower9662 Год назад +1

    sir i messaged you on instagram but you didn't reply