Google Sheets Query Function Explained

Sdílet
Vložit
  • čas přidán 4. 08. 2024
  • Join 400,000+ professionals in our courses here 👉 link.xelplus.com/yt-d-all-cou...
    Dive into the world of data analysis with Google Sheets' QUERY function. While it might seem intimidating at first, understanding its basics unlocks a world of possibilities. From simple data retrieval to complex analysis, QUERY is your go-to tool.
    🎓 To master the QUERY function and other important functions check out my complete Google Sheets course: www.xelplus.com/course/google...
    🔑 Key Points:
    ▪️ Understanding Clauses: Learn the sequence and usage of clauses like SELECT, WHERE, GROUP BY, ORDER BY, and PIVOT. Remember, the order is crucial.
    ▪️ Practical Examples: Start with basic queries like selecting specific columns, then advance to aggregating data with SUM, and sorting results with ORDER BY.
    ▪️ Advanced Usage: Explore grouping data with GROUP BY, pivoting data for a clearer view, and using ORDER BY for sorting.
    ▪️ Custom Formatting: Utilize the FORMAT clause to tailor the appearance of your data directly within the QUERY function.
    ▪️ Labeling and Limiting: Change column labels with the LABEL clause and limit the number of results with LIMIT for concise reports.
    The QUERY functions is one of THE most powerful functions in Google Sheets when it comes to data analysis and data manipulation. But because it has all this flexibility it's not an easy function to master at first.
    In this video I'll teach you the basics and the set of rules you need to follow if you really want to understand the Query Function in Google Sheets. You'll learn how to use SELECT, WHERE, LIMIT, GROUP BY, FORMAT and other clauses to filter data. You'll also learn how to exclude null value cells or cells that are empty when using QUERY. Also how to include cells with a specific value. We'll sort data in ascending and descending order with Query. We'll also use aggregation functions in QUERY such as the sum function.
    00:00 How to Use the Google Sheets QUERY Function
    00:43 Clauses in Google Sheets QUERY Function
    01:57 Practical Example with Google Sheets QUERY Function
    04:41 How to Aggregate Data with Google Sheets QUERY Function
    08:27 How to Use Order By Clause in Google Sheets Query Function
    10:19 How to Format Data with Google Sheets Query Function
    11:06 How to Use the Label Clause in Google Sheets Query Function
    11:32 How to Use Limit Clause in Google Sheets Query Function
    Check out this video to learn how to use QUERY function together with IMPORTRANGE: • IMPORTRANGE Function i...
    More Google Sheets Tutorials: • Google Sheets Tips, Tr...
    ★ My Online Excel Courses ► www.xelplus.com/courses/
    ➡️ Join this channel to get access to perks: / @leilagharani
    👕☕ Get the Official XelPlus MERCH: xelplus.creator-spring.com/
    🎓 Not sure which of my Excel courses fits best for you? Take the quiz: www.xelplus.com/course-quiz/
    🎥 RESOURCES I recommend: www.xelplus.com/resources/
    🚩Let’s connect on social:
    Instagram: / lgharani
    LinkedIn: / xelplus
    Note: This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!
    #googlesheets #query

Komentáře • 230

  • @LeilaGharani
    @LeilaGharani  Před 6 měsíci +1

    Get access to the complete Google Sheets Masterclass here 👉 www.xelplus.com/course/google-sheets/

  • @bobbyman410
    @bobbyman410 Před 3 lety +47

    The biggest thing I like about Leila is how she interacts with everyone in the comments and considers her viewers as friends. Great content as usual, can't wait for the next video!

    • @LeilaGharani
      @LeilaGharani  Před 3 lety +13

      Thank you! We're friends with similar interests - specially that we all love to learn.

  • @davidtmiller56
    @davidtmiller56 Před 3 lety +6

    Another excellent video. I’ve been using the Query function since 2015. This is an excellent quick overview. Well done.

  • @abdullahquhtani4247
    @abdullahquhtani4247 Před 3 lety +5

    You are one of my favorite instructors. I bought your Excel courses on Udemy. BUT this one is beyond my budget as a collage student 😢 I may consider enrolling when there is another discount on next Black Friday or sooner one. Thank you 🙏.

  • @IsraTC
    @IsraTC Před 3 lety +1

    La manera en la que llevas el paso a paso hace que sea sumamente útil, contigo práctico 2 casas a la vez.
    El excel y el idioma.
    Muchas gracias Leila, saludos desde México

  • @charlesrobertthomas
    @charlesrobertthomas Před 7 měsíci +1

    I've been watching your videos in MS Excel and wanted to try my hand at Google Sheets. This is the first of your videos I've watched on Google Sheets. AWESOME!!!!! Wish I had known earlier that you were a Google Sheets guru as well, it would have saved me a ton of time.

  • @malikastar9265
    @malikastar9265 Před rokem +1

    All your tutorials Leila are great, clear and to the point, thank you !

  • @nadeemmalik8031
    @nadeemmalik8031 Před 3 lety +6

    Google Sheets is really cool. I like the way Leila explains the Query Function. It is very well illustrated and Leila's examples used to explain the topic are always brilliant and well thought out. Leila you really are the best video tutor on CZcams. Your experience and knowledge is exemplary.

  • @dlovegrove11
    @dlovegrove11 Před 3 lety +1

    Wow, this is great! I have recently started diving into Google Sheets, and this video is super helpful and clear. Thanks!

  • @RajeshKumar-mf3jf
    @RajeshKumar-mf3jf Před 3 lety

    you have a great illustrating power, whatever i am currently doing in my business, every credit goes to you Leila,

  • @jjackson4273
    @jjackson4273 Před rokem +1

    I was really overwhelmed by the query function, but you made it simple to understand. Thanks so much for this video!

  • @imr4nkhan
    @imr4nkhan Před rokem +1

    This is so powerful and your presentation style makes it look way too easy... thanks Leila, you rock!💥

  • @davidlondon9242
    @davidlondon9242 Před 2 lety +1

    Great video. I found out what I needed to know, quickly, in a way that was easy to understand and apply for my circumstance. Thank you.

  • @mahsekerpolat3817
    @mahsekerpolat3817 Před 2 lety

    You are my rescue! Thank you So much for your amazing work!

  • @matrixsecurityandautomatio427

    Leila ma'am, you are spreading your knowledge in a great way. Thanks for your efforts

  • @aryanbarnwal5180
    @aryanbarnwal5180 Před 2 lety

    Great tutorial helped me understand the query function easily, which I was finding challenging at first.

  • @hosseinkhabiri4060
    @hosseinkhabiri4060 Před rokem

    سپاس سرکار خانم قرانی، مفید بود.

  • @mirekkryskapriv7445
    @mirekkryskapriv7445 Před 2 lety

    Great explanation! Thank you a lot!!!

  • @ilfipetrov9208
    @ilfipetrov9208 Před rokem

    Thank you so much! Great video. Finally got around to tackling this issue )

  • @viniciusdias5478
    @viniciusdias5478 Před 3 lety +1

    Very good Leyla, congratulation!

  • @user-Bryant_Liu
    @user-Bryant_Liu Před 28 dny

    Really helpful and clear! Thanks a lot!

  • @mrashid229
    @mrashid229 Před 3 lety

    The best thing about this video is, it is only (12:3৪) long but describes most lucrative aspects of query() and SQL(google sheet) so clearly! Apparently too short (time) to cover so many features. Once again I am amazed by your presentation/delivery skill Leila.

  • @xiangxiang397
    @xiangxiang397 Před 2 lety

    Nice!!! This was the very first watching video about query :)

  • @michaelcasabar4316
    @michaelcasabar4316 Před rokem +1

    i learned more from you than my college prof. Great vid!

  • @ehsanbb1983
    @ehsanbb1983 Před 6 měsíci

    Great! Thank you Leila

  • @josericardo3015
    @josericardo3015 Před 3 lety +1

    Very Powerful Function!

  • @CharcoalDaddyBBQ
    @CharcoalDaddyBBQ Před rokem

    This has made my daily life so much easier!!

  • @dvd.25
    @dvd.25 Před 2 lety +1

    I saw many videos about query function, but I could not understand and learn enough to use it. Thank you Leila. Now all the concepts got clearer and I learned a lot through this video. I am subscribing you. Thank you again..

  • @wayneedmondson1065
    @wayneedmondson1065 Před 3 lety +1

    Hi Leila. Very interesting and powerful function. Thanks for the examples to get started. Thumbs up!!

  • @ebinvarghese8624
    @ebinvarghese8624 Před 3 lety

    Thank u very much madam. Your video is very easy to understand difficult areas of excell and google sheets. God bless u.

  • @SothearithKONGMrMuyKhmer
    @SothearithKONGMrMuyKhmer Před 3 lety +2

    Google sheet has some more special features than Excel. Thanks Leila for great video, as always! 👍😍

  • @crmwako2757
    @crmwako2757 Před 2 lety

    Thanks a lot, so helpful!

  • @anorenbergs
    @anorenbergs Před 3 lety

    Leila, you are the best. Thank you!

  • @iancarr3923
    @iancarr3923 Před rokem

    Excellent introduction to Query. Thanks

  • @kerronduncan6697
    @kerronduncan6697 Před 3 lety +1

    I clearly am guilty of underestimating google sheets. Wow powerful function. Thanks for sharing Leila!!

    • @LeilaGharani
      @LeilaGharani  Před 3 lety +2

      Glad it was helpful! There are quite a few hidden gems in sheets.

  • @hiteshrathod692
    @hiteshrathod692 Před 3 lety +1

    This is helpful...
    Thank you Leila!

  • @markfrombriz
    @markfrombriz Před 2 lety

    Brilliant explaination, so clear

  • @mohammadashiq9996
    @mohammadashiq9996 Před 3 lety +2

    I like Google sheets Query function trying more time making a more sense thank you Leila.

    • @trongpham9999
      @trongpham9999 Před 3 lety

      You will be more surprised when using the keywords "format", "pivot", "label", "limit".
      Try it!

  • @aumarivero
    @aumarivero Před 3 lety

    Thank you so much for this tutorial. You saved me!

  • @AccountingandQuickbooks

    Leila you always create amazing and helpful videos. 👍👍👍

  • @rahulrustagi6119
    @rahulrustagi6119 Před 2 lety

    👍👍👍 huge fan of your knowledge

  • @tonester1964
    @tonester1964 Před rokem

    This video was awesome!

  • @ambotsaimo9467
    @ambotsaimo9467 Před 3 lety

    Thank you for sharing your knowledge!!! You have a very clear and organized presentation! I salute you Mam!

  • @SamirHabib
    @SamirHabib Před 2 lety

    Təşəkkür edirəm Leila!!

  • @amarchaurasia3821
    @amarchaurasia3821 Před 2 lety

    Always a valuable video. Happy to see that 0 dislike. Perfecto

  • @lnlefteris4744
    @lnlefteris4744 Před 3 lety

    Amazing video!!!! Many thanks! just a question: does it have window functions like for example sum(sales) over (partition by scenario order by App)

  • @pjpw2320
    @pjpw2320 Před 3 lety

    Great video, Leila. Thank you.
    Is it a viable option to create a table area within a Google Sheet to set up various "what if" options in terms of input of various query variables for a certain set of data?
    Changes to inputs could then be quickly made by changing the variables in the table area.
    And, from a practical perspective, how far could you go with this methodology in terms of not just input variables for the various query clauses, but mathematical and boolean operators used in the query function as well, if at all possible?

  • @KNLP23
    @KNLP23 Před rokem

    Good job! Keep it up!

  • @chaddemeuse6760
    @chaddemeuse6760 Před 2 lety

    You're the best, hands down. Smashing the subscribe button

  • @venkatiyer7459
    @venkatiyer7459 Před 3 lety

    Thanks again for teaching something new ... your teaching skill is too good ...

  • @paulminosa7740
    @paulminosa7740 Před rokem

    This Video Saves my day awesome

  • @thinkthinktechs1119
    @thinkthinktechs1119 Před 3 lety

    Amazing work leila,I have seen all other google sheet videos on youtube but none looks wonderful like this

  • @ahmedmorsy8214
    @ahmedmorsy8214 Před 2 lety

    Super useful thank you

  • @jagdishhaldankar4677
    @jagdishhaldankar4677 Před 3 lety +1

    Hi Leila.
    Great video. Thanks for making such informative videos.
    Few queries:
    1) What is more efficient? (Query, Array, Pivot Tables)
    2) How skip first row or any specific row?

  • @2000sunsunny
    @2000sunsunny Před rokem

    Magic function. Enjoyed :) Thank you

  • @trongpham9999
    @trongpham9999 Před 3 lety +1

    4:04 I have a note, @Leila
    We will use Column number (like Col1, Col2, Col3) when using ImportRange() function or using array with { }
    even though the database and the QUERY() place are the same workbook.

  • @TheEmjay19
    @TheEmjay19 Před 3 lety

    Hi Ms Leila, really informative video, thank you!
    I have a question, if you please, in this query function, how do you select the column BY?

  • @AnandGautam9901
    @AnandGautam9901 Před 2 lety

    This one is awesome basic understanding

  • @blackknight6452
    @blackknight6452 Před 3 lety

    Thank you Leila. And happy new year

  • @NuriaHidalgo
    @NuriaHidalgo Před 3 lety +1

    Mein Gott, so viele Sachen 😅 dankbar, dass ich dein Google sheets Kurs gekauft hatte 👍🏼

  • @ranganathasadalbanjan9802

    I love this.

  • @TheTramos00
    @TheTramos00 Před 3 lety

    After learning enough Excel and enough VBA I think that Google Sheets is the right direction. But Javascript is needed also to see the real potential. Thanks for these videos.

    • @LeilaGharani
      @LeilaGharani  Před 3 lety +1

      Agree. JavaScript would be a good language to know (I'm actually learning it now 😀) Excel online also uses JavaScript so it will be easy to create automations on both sides.

  • @beanjp
    @beanjp Před 6 měsíci

    I found this video very helpful ❤

  • @kevincockburn6305
    @kevincockburn6305 Před 3 lety

    Great Thanks

  • @hassanmburia8825
    @hassanmburia8825 Před rokem

    Thanks you so much

  • @undhaddipak
    @undhaddipak Před 3 lety +1

    it is most useful video and enhance my knowledge. Thank you mam

  • @martinapenasso
    @martinapenasso Před 2 lety

    Hi Leila, this video is super useful!! Thank you. Do you know if there is any chance to do the same in Excel?

  • @nitee2482
    @nitee2482 Před 2 lety

    super cool this is 🎉

  • @rehanahmad1306
    @rehanahmad1306 Před rokem

    Hello Leila, your tutorials are always helpful. I want to ask if query function is helpful in creating a dynamic content calendar, where we put all detail on a sheet and it get posted on calendar automatically?

  • @bradleyhowell3298
    @bradleyhowell3298 Před 3 lety

    What a fantastic video! My brain hurts but I followed most... You will be seeing more of me!

  • @2JSinc
    @2JSinc Před 3 lety

    Thanks you for this, after watching this and the importrange video, I managed to use the query function to import columns from my google form's, Form Responses sheet into a new Print Layout sheet, and do a switch functions on the imported data and populate several columns, now I have a Google form for entering my 3 required fields and have 8 column/fields automatically and automatically have a formatted layout ready for printing for my report. I could also just send the link of the google form to our personnel on the field and have them submit an entry anywhere they go... Thank you Super Hero and Gorgeous Ms. Liela...

    • @LeilaGharani
      @LeilaGharani  Před 3 lety +1

      That's great! I'm glad the videos are helpful.

    • @2JSinc
      @2JSinc Před 3 lety

      @@LeilaGharani been watching your videos for several years now and they have been very helpful. Thanks for making them free to watch for all of us here... Happy new year!

  • @rbfreitas
    @rbfreitas Před 11 měsíci

    Great video

  • @danjarupath
    @danjarupath Před 3 lety

    💕💕💕💕💕 Love your vdo

  • @markk3701
    @markk3701 Před 3 lety

    Most helpful person on CZcams

  • @BaluSubbuBalasubramanya

    Simple and under standing 🧍‍♂️ 👌

  • @Veigaburame
    @Veigaburame Před rokem

    you are the legend

  • @franciscovwilliams
    @franciscovwilliams Před 3 lety

    What a useful video! I did not know this function in Google Sheets. It's kind of similar to Pivot Table in Excel. I like it because it makes you feel like a badass programmer! haha

  • @mohammedhassan2808
    @mohammedhassan2808 Před 3 lety

    Amazing tricks

  • @praveensharma2632
    @praveensharma2632 Před 3 lety +2

    One more wonder by Leila.👍

  • @TylerStanczak
    @TylerStanczak Před 3 lety +3

    Haha I love that part at 0:24 really cool gif insert. :)

  • @peterwoods35
    @peterwoods35 Před rokem

    Nice!

  • @davidjr.5584
    @davidjr.5584 Před 3 lety

    Hi Leila, love your content.
    Can you do a video about social network graph in excel?

  • @yukari3305
    @yukari3305 Před rokem

    Thanks and for the sharing Teacher Leila

  • @les.matematika.online
    @les.matematika.online Před 10 měsíci

    Very lucky to find this video, because I have a problem related to my business which requires connecting some data in Google Sheet, thank you

  • @safashaikh4089
    @safashaikh4089 Před 3 lety

    Wonderful video thanks 👍

  • @rodcas
    @rodcas Před 3 lety

    who else read ”Quiero function”? happy new year ty for all the vids

  • @sathyamoney
    @sathyamoney Před 3 lety

    Nice video... Learned something new today thanks...😊😊😊

  • @chelahjojo4563
    @chelahjojo4563 Před 2 lety

    well done

  • @hosseinhosseinpoor4845

    thanks..

  • @Augusto_SilvaN
    @Augusto_SilvaN Před 2 lety

    Thanks

  • @mreighties2860
    @mreighties2860 Před 3 lety

    Also when you QUERY within same workbook and have data on multiple tabs that you want to combine inside an array literal you have to use Column Numbers - Col1, Col2, Col3. Like in this QUERY formula...
    =QUERY({Sheet1!A:D;Sheet2!A:D;Sheet3!A:D},"Select * where Col1 is not null ",1)
    ...notice I have the 3 sheets inside curly brackets with each separated by a semi-colon. This forces the data from each sheet to be stacked on top of each other so all data is only in 4 columns, A:D so that we can reference them as Col1, Col2, Col3 and Col4. If I used a comma then the data will appear in 12 columns showing data from each sheet in a row like row 2 from each sheet in row 2 with headers in row 1.
    Great tutorial Leila!
    James/mreighties :)

  • @highnickelalloys
    @highnickelalloys Před 2 lety

    Thanks!

  • @EnglishSquared
    @EnglishSquared Před 2 lety

    Great video. I need to select from a dataset based on color. I am quite new at this - if anyone has some hints (a good video, for example), that would be great.

  • @Paulydude1
    @Paulydude1 Před 3 lety

    Wow that’s powerful and easy, if you already know sql. Thanks

  • @chakralamurali
    @chakralamurali Před rokem

    Excellent madam

  • @amolparbat6428
    @amolparbat6428 Před 3 lety

    Thank You Leila ...for your help and Congratulations for your new achivement .... many more to come....Had a quick question on Query ....I have data in which one column has number format as " AB12234" when I use query function it's gives put as " " can you please provide resolution for this .... thank you

  • @josericardo3015
    @josericardo3015 Před 3 lety

    Tks for the video Leila!
    As usual very explained!
    Is there in Google sheets something as Power Query in order to clean unstructured data?

    • @LeilaGharani
      @LeilaGharani  Před 3 lety

      BigQuery seems to be the Power Query alternative. I haven't had a close look yet though....

  • @girishwavhal6171
    @girishwavhal6171 Před 3 lety

    Hi Leila, Just wanted to to know how can we select a specific word from a particular cell and through the query can we also get the count of that unique word..

  • @sachitsrinivas03
    @sachitsrinivas03 Před 2 lety

    Great Video, how do I sort a column month-wise in ascending order?

  • @tangsh497
    @tangsh497 Před 3 lety

    powerful and complicated formula

    • @lacs83
      @lacs83 Před 3 lety

      complicated???