Advanced SQL Tutorial | Subqueries

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

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

  • @adityapandey6969
    @adityapandey6969 ปีที่แล้ว +78

    The entire, Beginner, Intermediate, and Advanced playlists are a gold mine, Alex!
    Thank You!!!

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

      Glad you like them!

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

      where is advance sql playlist

  • @ekinci_io
    @ekinci_io 9 หลายเดือนก่อน +4

    As someone who received SQL training during master's degree, I have to say that I learned much more from Alex's SQL lessons than what I learned at school. You are amazing Alex!

  • @damasusaditama2148
    @damasusaditama2148 3 ปีที่แล้ว +85

    All your SQL tutorial videos from the basic up to this have helped me understand SQL, MUCH BETTER compared to the explanation that I've got from a bootcamp. Your explanation is so complete and concise. Thank you so much, Alex!

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

      Really glad to hear it! :D

    • @alexter001122
      @alexter001122 ปีที่แล้ว

      Question: were you able to land an analyst job after finishing your bootcamp?

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

      @@alexter001122 yes. I finished my bootcamp in Sep-2021, then applied for a data analyst position at various startups, did some interviews, and started working as a data analyst in Feb-2022.

  • @usuallyclueless4477
    @usuallyclueless4477 3 ปีที่แล้ว +188

    I have a Coursera certificate in MySQL, but you've explained it so much better than the instructor of that course.

    • @ericfiumano4694
      @ericfiumano4694 2 ปีที่แล้ว +15

      I cannot speak for MySQL course cause I haven't attended it but, having attended other technical Coursera (and Google, too) Courses I fet a little bit disappointed regarding the content. Definitively, too much bla bla bla and little practical approach.

    • @wasitthat
      @wasitthat 2 ปีที่แล้ว +6

      I'm taking that course right now. Have to heavily supplement it with the mode tutorial because the actual course lacks soooo much detail and examples!

    • @tasadem20
      @tasadem20 2 ปีที่แล้ว +9

      Same. Taking a 4 week class from Coursera and i was stuck on week 3 where the instuctor teaches subquiries and joins. Hope this video will help

    • @ninas.2724
      @ninas.2724 2 ปีที่แล้ว +4

      @@tasadem20 I’m having the same problem in week 3, I couldn’t understand the instructor and she didn’t not explain correctly

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

      I have the same issue on datacamp, before I realised I was already doing nested subqueries and CTEs 💀

  • @halildurmaz7827
    @halildurmaz7827 2 ปีที่แล้ว +5

    Perfectly clear explanation. However, I also noticed wrong information:
    7:17 You said, "In your Subquery, you can only have 1 column selected". However, you can select multiple columns by using parentheses --------> WHERE (a, b) IN (SELECT a, b FROM x)

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

    Holy mackerel! We think and code exactly the same.This is exactly how I teach people about sub-queries, and partition by, and even the rarely used 'right join' which is similar to 'not in' where clause sub-query.

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

    I thought I knew SQL, but this whole series of videos help me understand that I don't know anything. Although your explanation was ease to follow and understand, I feel that need more study to really understand all the concepts.Thanks a lot for your time to make this series.

  • @jjsinclair94
    @jjsinclair94 3 ปีที่แล้ว +34

    This has come just in time for an interview I have in the morning for a modelling analyst position, can't begin to describe how much your videos have helped! Keep up the crazy good work you are doing here!

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

      best of luck and i hope you celebrate with us when you get it. cheers

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

      did you get that job ?

  • @marcellaperkes4870
    @marcellaperkes4870 2 ปีที่แล้ว +24

    Thank you Alex! 🙌 For the last year I’ve been learning about data analysis/computer science part time, with the goal to move into the tech industry so that I can WFH, be available to my kids, and have income growth potential. Your videos were fundamental to my learning. I just landed my first job in the industry, and I attribute a big part of that to you.

    • @IceTobSmoKeo
      @IceTobSmoKeo ปีที่แล้ว

      How was your journey now? Mind sharing us your experience?

  • @stultuses
    @stultuses 2 ปีที่แล้ว +4

    Excellent, someone who knows how to zoom in for those watching on mobile!!!!

  • @loose.electricity
    @loose.electricity ปีที่แล้ว +6

    Just finished this series, thank you so much, you've re-ignited my passion for learning again. These simple, clear explanations of concepts has given me the confidence to dive back into more advanced concepts again.

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

    I Am glad I followed the whole series of SQL tutorials from easy to advanced. Now I am clear on the concept. Now I am going to follow a real-world project of yours.

  • @ninahbae2922
    @ninahbae2922 ปีที่แล้ว +14

    Today i have completed SQL😩😩🥰❤️ Am so grateful for having found your channel, i believe by 2024 i will land a data analyst role in government or health care all studying from this bootcamp from scratch🙏🙏🙏 never been as committed, thank you so much once again, tomorrow am starting off with Python

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

      wish you all the best in your journey. consistency is key 💪

    • @mizerosamuel5613
      @mizerosamuel5613 9 หลายเดือนก่อน

      How is it now????

  • @yanirhaim7787
    @yanirhaim7787 3 ปีที่แล้ว +6

    Thanks for the great tutorial! Currently on my Google Data Analytics Certificate! This video made it easier to understand the concept!

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

    King, you are the best sql teacher on youtube. Thanks SO much for making content on sql concepts that are actually used in everyday work flows.

  • @matheuspegorari1094
    @matheuspegorari1094 3 ปีที่แล้ว +7

    I love your videos, content is never enough. I know sometimes may be obvious to talk about something like subqueries when we have lots of content in the internet, but your explanation is very pertinent and very didatic, i learned a lot today. For this I thank you.

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

      So glad to hear that! And I agree - sometimes one good explanation of something is all you need to really get the grasp of it

    • @esthernwaogu592
      @esthernwaogu592 ปีที่แล้ว

      Hello matheus please can we chat on telegram I need assistance

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

    I've just finished this series (1 week). I'm going to rewatch it all again (hopefully 1 day) and then start the Portfolio Project. I started from 0 and your videos are purely useful content, it made me understand SQL really fast.
    Thanks from Spain.
    PD: I will communicate here when I finish the course completly and also if I am lucky enough to get a job.

    • @srijanrawat4014
      @srijanrawat4014 ปีที่แล้ว

      do tell

    • @mizerosamuel5613
      @mizerosamuel5613 9 หลายเดือนก่อน

      How is it now?

    • @Alexdasilva872
      @Alexdasilva872 9 หลายเดือนก่อน

      @@mizerosamuel5613 I got a job. :) This really helped me!

    • @Alexdasilva872
      @Alexdasilva872 9 หลายเดือนก่อน

      @@mizerosamuel5613i got one bro

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

    I just finished the Beginner, Intermediate, and Advanced SQL videos. Thank you, Alex, for publishing these. I'm adding SQL to my tool belt. These were a fantastic first look at the language.

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

    Thanks for letting us know that for a subquery in the SELECT and WHERE clauses; it can only have a single value and single column respectively as an output.

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

    Thank you so much Alex! I went through the basic, intermediate and advanced SQL Tutorials. I would love to learn more about the store procedures in detail!

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

      You're most welcome! Thanks for learning with me :)

  • @ImEli2215
    @ImEli2215 ปีที่แล้ว

    After roaming around with other tutorials, it makes your tutorial more valued. Thanks sir

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

    Had troubles understanding some concepts from a bootcamp but your explanations are amazing! Concise, precise and easy to understand.Thank you!

  • @DiwasSapkota-x3q
    @DiwasSapkota-x3q ปีที่แล้ว +1

    Thanks Alex for teaching Advance SQL REALLY QUICK.

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

    Thanks so much for these tutorials! I had a basic understanding of queries in ArcMap for GIS data and didn't understand why it was really that important but now thinking of it as having a database that has pre-made queries that can be manipulated in different ways to process and analyze data has made me understand its importance!

  • @sols9019
    @sols9019 9 หลายเดือนก่อน +1

    Done for SQL Tutorial after 3 weeks of learning and spending 2-3 hours in each session while creating different scenarios outside the samples. hehe Mygee! I made it! haha! Thank you Alex! Next step is to get a certificate of SQL before proceeding to the other Tools. Hopefully I'm doing it right. Lol

  • @salikmalik7631
    @salikmalik7631 3 ปีที่แล้ว +14

    Your videos are good Alex.
    We need a playlist of SQL needed for data science. Its a request. :)

  • @bryanpaulcardinoza7693
    @bryanpaulcardinoza7693 ปีที่แล้ว

    Just finished watching all sql tutorial videos in this bootcamp. Time to watch the portfolio project.

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

    Im taking a test today and this is the perfect video for a quick reminder of everything.

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

    Brilliant SQL Tutorial Series! Every Video has really helped to fill in any potential gaps in my knowledge and even reinforce my existing skills. Thanks Alex!

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

    Finally finish this advanced tutorial. Keep going for next series...

  • @AnglBunny
    @AnglBunny ปีที่แล้ว

    Thank you so much for posting this series. I am learning SQL for the first time and your videos are extremely helpful :)

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

    You posted a tutorial on CTE before this. I am following from the older videos to the newer ones so I got lost for a bit and had to come find this. Thank you for making learning easy

  • @MdParvaz-f4p
    @MdParvaz-f4p 2 วันที่ผ่านมา

    This content is gold. Thank you for putting this out here!

  • @momohtimothy6898
    @momohtimothy6898 9 หลายเดือนก่อน

    I am Finally done with SQL on this amazing channel. But got to go back for some revisions.

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

    Thank you Alex, i really learnt a lot from the beginners series up this advance series

  • @vuphan2956
    @vuphan2956 4 หลายเดือนก่อน

    This is a great video about subquery. Thank you, Alex!

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

    Thanks for giving such a clear and concise explanation for why one would use subqueries! I'm currently working through the Google Data Analyst certification program and your explanation and approach was much easier to understand than the instructor who presented on this very topic.

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

    Very helpful. All your videos about SQL are very easy to grasp and concise. Thank you so much.

  • @ChilledSquirrelyt
    @ChilledSquirrelyt ปีที่แล้ว

    Where is primary and foreign key video could you please share the link

  • @1689JeffChavez
    @1689JeffChavez ปีที่แล้ว

    On my journey through the boot camp...
    This comes in handy. Thank you.

  • @fantasytrain42
    @fantasytrain42 ปีที่แล้ว

    I have enjoyed your videos. I have been programming and working as a dba for a long time, 28 years - since sql server 4.2. (Do you remember *=). I would consider myself an expert in sql server. I was even able to pick up a couple things in your sql videos that I didn’t know or at least did 8n a different way. Great job. Looking forward to the python and newer content. Working towards learning how to use ML to help clean data and find errors over the next year.

  • @YaseenSindhi-q3s
    @YaseenSindhi-q3s 7 วันที่ผ่านมา

    Amazing video! Your hard work truly paid off. 👏

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

    I learned so much with your videos. You made learning SQL very fun. I enjoyed your examples. Thank you!

  • @JustinLietz
    @JustinLietz 7 หลายเดือนก่อน

    Thank you for sharing, really really appreciate this. I would love to see more advanced stuff, specifically examples where you're using synonyms across different servers within source stored procedures (used to populate stage tables) to make joins along with ctes. I am at an internship right now, and still in my first year of college, I feel completely lost when working in these health insurance databases, most videos on youtube don't really go into more complicated stuff that I work with everyday so thank you again
    Many of these queries in the code base are 3000+ lines long and my brain goes numb looking at all the subqueries, joins, and obscure functions I have no idea what they do

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

    I have taken udacity course on sql and i applied the course on an actual db but your tutorials are much better realy specially on the joins

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

    Keep up the Amazing content Alex!

  • @thesamshekhawat9500
    @thesamshekhawat9500 ปีที่แล้ว

    Thank you so much Alex for providing such a valuable skills for free. It really made me become a aspiring data analyst.

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

    This is tremendously helpful. Got to resolve a blocker because of you. Thanks!

  • @MrXRes
    @MrXRes ปีที่แล้ว

    You just basically saved my career now

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

    God bless you, Mr. SQL.

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

    Thank you so much. I had trouble understanding sub-queries. You've explained it so well. 😎

  • @richardogden1466
    @richardogden1466 ปีที่แล้ว

    Thank you for your work and detailed explanations Alex. I mainly use COGNOS and COGNOS SQL so this is a great crash course for me to learn the differences between the two.

  • @itikalaneelu9126
    @itikalaneelu9126 ปีที่แล้ว

    keep up the good work sir. I have been following your videos and techtfq videos as well and learned so much

  • @A7mouzi
    @A7mouzi 6 หลายเดือนก่อน

    do you have any suggestions on where I could practice these functions more? and this playlist is really beneficial thanks for the time and effort!

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

    WOAHH!!!😍😍 Thank you so much for making it easy :)

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

    Thank you Alex for ur way in simplifying the training! Are you giving later more advanced videos about SQL or that is all ?

  • @MightyMouse11
    @MightyMouse11 3 วันที่ผ่านมา

    Great explanation of subqueries. Thanks.

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

    Sounds like Dane Cook is teaching me SQL. Good video, thank you.

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

    This looks like a really interesting subject. I didn’t know anything about it until now, but I suspect the exponential, geometric, and weibull distributions might factor in?

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

    What happens if you remove "over ()" from the "with Partition By" example?

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

    I wish I had this during my undergrad over a decade ago.

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

    I just learned this recently! Wonder do you have any recommendation for an intermediate level courses after the beginner course? I'm 75% done with my SQL beginner course. Thanks! :)

  • @jpzhang8290
    @jpzhang8290 ปีที่แล้ว

    Subquery can also alternatively be replaced by temp table or CTE.

  • @YoYo-gf9wb
    @YoYo-gf9wb 3 ปีที่แล้ว +1

    You should remind ppl to like your videos. I really like all your videos, super helpful~~~ but always forget to like it....

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

    Hello Alex, why did you create the subquery when to get the average you could have just specified :
    "SELECT EmployeeID, Salary, (AVG)salary
    FROM EmployeeSalary"?
    I am really confused and would be glad if you could help.

  • @michaeloyetunde8974
    @michaeloyetunde8974 ปีที่แล้ว

    Thank you so much, Alex. Your videos are superb.

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

    Hey Alex thanks for making videos which are so informative and helpful..as a mechanical engineer who wants to change his profession to data analyst ..what will u suggest to learn first

  • @MaheenAbdulwaheed
    @MaheenAbdulwaheed ปีที่แล้ว

    Hey Alex! All your videos on Sql Tutorials are awesome! Can you make a video on how to use primary and foreign keys in Sql Server? You've mentioned in one of your videos that you'll be covering those topics but I haven't come across the PK and FK in the Sql Tutorials(maybe I've missed them). Or if you have a video already out, could you direct me to it? Thanks for all the videos, they've helped me understand SQL Server much better!

  • @csyronnegalang679
    @csyronnegalang679 8 หลายเดือนก่อน

    Hi! I just tried the syntax for subquery in where but I tried it also using join and got exact result
    *Alex subquery in Where*
    select EmployeeID, JobTitle, Salary
    from EmployeeSalary
    where EmployeeID in (
    select EmployeeID
    from EmployeeDemographics
    where Age > 30
    )
    *my syntax*:
    select demo.EmployeeID, JobTitle, Salary
    from EmployeeDemographics as demo
    join EmployeeSalary as sal
    on demo.EmployeeID = sal.EmployeeID
    where Age > 30
    Anyway, I find your tutorial very informative and tried to use some work arounds if they will have the same output. Thank you always, Alex!

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

    In the last query, you used a subquery in the WHERE clause to filter for employees over 30. Could you also have accomplished that by joining the two tables and adding a WHERE EmployeeDemographics.Age > 30?

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

      Agree Veronica, in that case we could use it in a join table. However, I believe using the subquery in the where clause is much faster than joining in this case. Maybe Alex could confirm that?

  • @SeanBaker
    @SeanBaker 3 ปีที่แล้ว +12

    I’ve been using SQL on my job since 2007, and I swear that I still don’t know everything I should know when it comes to really "complicated" queries.

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

    What program is used here? It looks like a Jupyter NB for SQL

  • @claraoliva254
    @claraoliva254 ปีที่แล้ว

    Just to clarify, only the where statement combined with the subquery can only have 1 column selected? SELECT and FROM can select all columns if wanted from a subquery? thanks!

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

    Is there a further explanation as to why we can't see the AVG salary for all employees when we don't use a subquery or partition by? I am not understanding how GROUP BY EmployeeID, Salary is not the same.

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

    1:15 This first example. Can someone please explain why you need a subquery? Creating the query without the subquery will return an error. Why can't SQL return the employee ID field along with the average salary at the same time? Why does the average salary have to be calculated first via a subquery? What is the logic behind it?

    • @EyesonEthics
      @EyesonEthics 4 หลายเดือนก่อน

      Same question

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

    Thanks Alex.
    Great course

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

    Thanks Alex!

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

    Hello Alex,
    Where can we find some practice excercises to practice SQL queries?

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

      Try StrataScratch.com or Leetcode.com :)

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

      @@AlexTheAnalyst Thank You 🙂

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

    thank you Alex!

  • @frybait0626
    @frybait0626 ปีที่แล้ว

    How about doing an AVG SALARY for each employee instead of AVG FOR ALL? How do you query that?

  • @rickydethan7037
    @rickydethan7037 ปีที่แล้ว

    I just finished the SQL tutorial from beginner to advanced. Now I want to start the portofolio project but part 2 & 4 of that video are missing. Let me know when those video already uploaded. thank you very much and sorry if there's something wrong about this comment, I'm still learning English

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

    Thank you this series is really helpful. 👌

  • @EvanMcLaren
    @EvanMcLaren ปีที่แล้ว

    I'm curious about the alias or variable "a" you gave to the subquery. Just trying to understand why this is necessary.

  • @lucatintor4896
    @lucatintor4896 ปีที่แล้ว

    Hello teacher where can I load those data to practice following your explanations?
    Thank you

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

    Please make a video on Window Functions. I love your videos :)

  • @shappirefishing1186
    @shappirefishing1186 ปีที่แล้ว

    Excellent Tutorial

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

    I'd love a tutorial for working with SSIS Packages

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

    Great content

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

    Very helpful, thank you. Is there a way to find out the input parameters of a stored procedure, that someone else may have created, w/o using the "modify" option?

  • @esthernwaogu592
    @esthernwaogu592 ปีที่แล้ว

    Hello Alex
    I love ur videos they v been guiding me through data analysis but i v issues with my sql

  • @queenbecca5157
    @queenbecca5157 ปีที่แล้ว

    Mr Alex. I'm currently following your steps on tge sql project but it shows me operand divide. And it is giving me errors . Please someone show help me out

  • @אוריתגנה
    @אוריתגנה ปีที่แล้ว

    hello Alex and thanks for greate videos.
    What "over ()" means?
    thanks

  • @BPOCODER
    @BPOCODER ปีที่แล้ว

    I wanna ask a question, that can we build charts and graphs in mysql for reporting?

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

    Hi there! great content!! Just to know, in a working place, how often is a subquery used compared to the join function?
    As both can give the same result.

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

      Joins are used all the time - subqueries about 10% as many times as joins

  • @yaseenal-wesabi5964
    @yaseenal-wesabi5964 ปีที่แล้ว

    Had an issue with the server connection, any idea to fix that?

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

    that was really quick

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

    And one thing I am confusing in, that which one is better to learn Tableau or Power Bi?

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

      wondering the same thing

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

    Thank you for this video and recommendation

  • @marius9897
    @marius9897 ปีที่แล้ว

    Hi Alex. Thank you very much for this series of videos. For me, your method of teaching is easy to follow and understand. Are perhaps you going to produce a tutorial on Goolge's Looker too in the near future?

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

    Is there a way that we can use the row generated from the SELECT subquery with a WHERE statement below. So looking something like that:
    SELECT EmployeeId, salary, (SELECT AVG(salary) FROM EmployeeSalary) as AllAvgSalary
    FROM EmployeeSalary
    WHERE AllAvgSalary>salary
    I've been running CTE's in those cases, but perhaps there is a more efficient way.