NON EQUI JOINS IN SQL | Advanced SQL | Ashutosh Kumar

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • Sql one of the most important language asked in most of the analytics interviews,in this series i have discussed some advanced level sql concepts that are frequently asked in data analyst,business analyst interviews. In this video i have covered non equi joins concepts in sql
    👉Query -
    drop table if exists cab;
    CREATE TABLE cab(id integer,state VARCHAR(200),city varchar(200),seater integer,charge integer);
    INSERT INTO cab(id,state,city,seater,charge)
    VALUES(1,'Jharkhand','Jamshedpur',4,3000),
    (2,'Bihar','Purnea',3,2250),
    (3,'Jharkhand','Jamshedpur',4,3000),
    (4,'West Bengal','Kolkata',2,1750),
    (5,'West Bengal','Siliguri',4,3500),
    (6,'Jharkhand','Ranchi',4,3000),
    (7,'Bihar','Sasaram',3,2100);
    drop table if exists customers;
    CREATE TABLE customers(id integer,namee VARCHAR(200),from_state VARCHAR(200),min_seater integer,min_rent integer,max_rent integer);
    INSERT INTO customers(id,namee,from_State,min_seater,min_rent,max_rent)
    VALUES(1,'Ram','Jharkhand',3,2500,3200),
    (2,'Shyam','West Bengal',2,1500,2500),
    (3,'Suresh','West Bengal',4,2500,4000),
    (4,'Mahesh','Bihar',3,2200,2500),
    (5,'Raj','Bihar',3,1800,2300);
    drop table if exists order_details;
    CREATE TABLE order_details(id integer,date date,cust_id integer,cab_id integer);
    INSERT INTO order_details(id,date,cust_id,cab_id)
    VALUES (1,'05-07-2022',1,1),
    (2,'05-07-2022',2,4),
    (3,'05-07-2022',3,5),
    (4,'05-07-2022',4,2);
    select * from cab;
    select * from customers;
    select * from order_details;
    👉 Complete playlist on Sql Interview questions and answers
    • HackerRank SQL problem...
    ---------------------------------------------------------------------------------------------------------------------
    Check out some more relevant content here
    👉 How to Learn SQL
    • How to learn sql for b...
    👉 How to become a business analyst complete roadmap-
    • Business Analyst Compl...
    👉 How to become a data analyst complete roadmap-
    • Data Analyst Complete ...
    👉 Top 3 you tube channels to learn sql for free for beginners
    • Video
    👉 Rank ,Dense Rank, Row Number in sql -
    • RANK - DENSE RANK - RO...
    👉 Cross join in sql
    • CROSS JOIN SQL
    👉 union join in sql
    • UNION IN SQL
    👉 left join in sql
    • LEFT JOIN IN SQL
    👉 Right join in sql
    • RIGHT JOIN IN SQL
    👉 Inner join in sql
    • INNER JOIN IN SQL
    👉 Introduction to tables and databases in sql -
    • INTRO TO TABLES AND DA...
    👉 Aggregate Function in sql
    • AGGREGATE FUNCTION IN SQL
    👉 Functions in sql-
    • IMPORTANT FUNCTIONS IN...
    👉 String Function in sql
    • STRING FUNCTIONS IN SQL
    👉 CRUD operations in sql
    • CREATE- READ- UPDATE-D...
    👉 Autoincrement in sql
    • Auto Increment in SQL ...
    👉 Primary Key in sql-
    • PRIMARY KEYS IN SQL - SQL
    👉 Null and Default values in sql-
    • NULL AND DEFAULT VALUE...
    👉 Data types in sql-
    • Data types in Sql - SQL
    ____________________________________________________________________
    Fill the form below to subscribe yourself to the analytics jobs mailing list to receive regular job opening updates - docs.google.co...
    Why you should definitely fill the analytics job updates google form - • Job Openings into busi...
    _______________________________________________________________________
    Connect with me
    📸Instagram - / ashutosh.analytics
    💻Linkedin- / ashutoszh
    _____________________________________________________________________
    Comment down if you have any doubts
    Please leave a LIKE 👍 and SUBSCRIBE ❤️ to my channel to receive more amazing content in data analytics and data science.
    _____________________________________________________________________
    🏷️ Tags
    sql,
    sql for data science,
    sql for data analytics,
    sql practise questions,
    sql practise questions and solutions,
    sql tutorials for beginners,
    sql problems for data engineers,
    ashutosh,
    ashutosh kumar,
    ashutosh kumar analytics,
    sql problems easy,
    sql problem medium,
    sql problems hard,
    sql window functions,
    sql advanced questions,
    rank functions in sql,
    lag lead in sql,
    sql interview questions and answers,
    sql interview questions,
    sql questions asked in interviews,
    hackerrank sql solutions,
    hackerearth sql solutions,
    leetcode sql solution
    🏷️HashTags
    #sql #interviews #questions #solutions

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

  • @AshutoshKumaryt
    @AshutoshKumaryt  2 года назад +1

    👉 SQL Portfolio Project Indian Census- Part 1
    ruclips.net/video/I3YvjFfn478/видео.html
    👉 Advanced Sql Concepts Complete Playlist
    ruclips.net/p/PLbTF1OfX62c3RQ_ZFfyNBWVPdz_OWTMLG

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

    Thank you Ashuthosh..after following your advance sql videos now I feel that I choose right path of learning , also gaining confidence to face interviews.

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

    In answer to last problem can we not use filter condition for date- order date>='03-07-2022'

  • @shibinabraham7819
    @shibinabraham7819 7 месяцев назад

    Hi Ashutosh, thank you for this video. I have one more question and request for you, something I wanted to see in implementation. Can you please create a video on Key/Value Pair Join for look up tables, especially emphasizing on Joins (Left, Inner, Self etc). This will be really helpful.

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

    Hi, Can someone please tell me why this code is giving a different output than what Ashutosh has used for question 3- Alternate cab for customers, though I have used the same logic-
    select a.name,a.from_state,b.id,b.charge from customers a,cab b,order_1 c where a.min_seater

  • @binaykumar2060
    @binaykumar2060 2 года назад

    Exalant

  • @perumalbalachandranjj2358
    @perumalbalachandranjj2358 2 года назад +1

    Can you upload frequently asked questions in sql?

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

    Self join like a brain teaser

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

    These problems are now days solved through AI
    It's of no use in the near future.

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

      Oh ok great thanks ,Which algorithm can be used for this scenario, may I know ?