Google Sheets Query Function Explained

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

Пікірлер: 228

  • @LeilaGharani
    @LeilaGharani5 ай бұрын

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

  • @bobbyman410
    @bobbyman4103 жыл бұрын

    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

    3 жыл бұрын

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

  • @davidtmiller56
    @davidtmiller563 жыл бұрын

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

  • @IsraTC
    @IsraTC3 жыл бұрын

    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

  • @jjackson4273
    @jjackson427311 ай бұрын

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

  • @malikastar9265
    @malikastar9265 Жыл бұрын

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

  • @abdullahquhtani4247
    @abdullahquhtani42473 жыл бұрын

    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 🙏.

  • @charlesrobertthomas
    @charlesrobertthomas6 ай бұрын

    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.

  • @dlovegrove11
    @dlovegrove113 жыл бұрын

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

  • @imr4nkhan
    @imr4nkhan Жыл бұрын

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

  • @RajeshKumar-mf3jf
    @RajeshKumar-mf3jf3 жыл бұрын

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

  • @user-Bryant_Liu
    @user-Bryant_Liu3 сағат бұрын

    Really helpful and clear! Thanks a lot!

  • @mahsekerpolat3817
    @mahsekerpolat38172 жыл бұрын

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

  • @aryanbarnwal5180
    @aryanbarnwal51802 жыл бұрын

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

  • @matrixsecurityandautomatio427
    @matrixsecurityandautomatio427 Жыл бұрын

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

  • @nadeemmalik8031
    @nadeemmalik80313 жыл бұрын

    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 KZread. Your experience and knowledge is exemplary.

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Glad it was helpful, Nadeem!

  • @davidlondon9242
    @davidlondon92422 жыл бұрын

    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.

  • @michaelcasabar4316
    @michaelcasabar4316 Жыл бұрын

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

  • @CharcoalDaddyBBQ
    @CharcoalDaddyBBQ Жыл бұрын

    This has made my daily life so much easier!!

  • @hosseinkhabiri4060
    @hosseinkhabiri4060 Жыл бұрын

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

  • @mirekkryskapriv7445
    @mirekkryskapriv7445 Жыл бұрын

    Great explanation! Thank you a lot!!!

  • @josericardo3015
    @josericardo30153 жыл бұрын

    Very Powerful Function!

  • @ilfipetrov9208
    @ilfipetrov9208 Жыл бұрын

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

  • @pjpw2320
    @pjpw23202 жыл бұрын

    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?

  • @iancarr3923
    @iancarr3923 Жыл бұрын

    Excellent introduction to Query. Thanks

  • @ehsanbb1983
    @ehsanbb19835 ай бұрын

    Great! Thank you Leila

  • @viniciusdias5478
    @viniciusdias54783 жыл бұрын

    Very good Leyla, congratulation!

  • @markfrombriz
    @markfrombriz2 жыл бұрын

    Brilliant explaination, so clear

  • @xiangxiang397
    @xiangxiang3972 жыл бұрын

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

  • @crmwako2757
    @crmwako27572 жыл бұрын

    Thanks a lot, so helpful!

  • @tonester1964
    @tonester1964 Жыл бұрын

    This video was awesome!

  • @ebinvarghese8624
    @ebinvarghese86243 жыл бұрын

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

  • @aumarivero
    @aumarivero3 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Great to hear!

  • @hiteshrathod692
    @hiteshrathod6923 жыл бұрын

    This is helpful... Thank you Leila!

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    I'm so glad! 🙏

  • @anorenbergs
    @anorenbergs3 жыл бұрын

    Leila, you are the best. Thank you!

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Thank you too!

  • @bean2jp
    @bean2jp5 ай бұрын

    I found this video very helpful ❤

  • @ahmedmorsy8214
    @ahmedmorsy82142 жыл бұрын

    Super useful thank you

  • @paulminosa7740
    @paulminosa7740 Жыл бұрын

    This Video Saves my day awesome

  • @rodcas
    @rodcas3 жыл бұрын

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

  • @AnandGautam9901
    @AnandGautam99012 жыл бұрын

    This one is awesome basic understanding

  • @rahulrustagi6119
    @rahulrustagi61192 жыл бұрын

    👍👍👍 huge fan of your knowledge

  • @lnlefteris4744
    @lnlefteris47443 жыл бұрын

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

  • @SothearithKONGMrMuyKhmer
    @SothearithKONGMrMuyKhmer3 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    You're welcome 😊

  • @mohammadashiq9996
    @mohammadashiq99963 жыл бұрын

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

  • @trongpham9999

    @trongpham9999

    3 жыл бұрын

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

  • @amarchaurasia3821
    @amarchaurasia38212 жыл бұрын

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

  • @wayneedmondson1065
    @wayneedmondson10653 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    You are so welcome Wayne! Thank you.

  • @kerronduncan6697
    @kerronduncan66973 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

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

  • @TheEmjay19
    @TheEmjay192 жыл бұрын

    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?

  • @hassanmburia8825
    @hassanmburia8825 Жыл бұрын

    Thanks you so much

  • @2000sunsunny
    @2000sunsunny Жыл бұрын

    Magic function. Enjoyed :) Thank you

  • @LeilaGharani

    @LeilaGharani

    Жыл бұрын

    Glad you enjoyed it!

  • @AccountingandQuickbooks
    @AccountingandQuickbooks3 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Thank you! 😃

  • @dvd.25
    @dvd.252 жыл бұрын

    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..

  • @LeilaGharani

    @LeilaGharani

    2 жыл бұрын

    Happy to hear that, David!

  • @martinapenasso
    @martinapenasso2 жыл бұрын

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

  • @ranganathasadalbanjan9802
    @ranganathasadalbanjan9802 Жыл бұрын

    I love this.

  • @mrashid229
    @mrashid2293 жыл бұрын

    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.

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Wow, thank you Munim!

  • @KNLP23
    @KNLP23 Жыл бұрын

    Good job! Keep it up!

  • @kevincockburn6305
    @kevincockburn63053 жыл бұрын

    Great Thanks

  • @venkatiyer7459
    @venkatiyer74593 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    So nice of you!

  • @ambotsaimo9467
    @ambotsaimo94673 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    It's my pleasure

  • @SamirHabib
    @SamirHabib2 жыл бұрын

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

  • @nitee2482
    @nitee24822 жыл бұрын

    super cool this is 🎉

  • @BaluSubbuBalasubramanya
    @BaluSubbuBalasubramanya2 жыл бұрын

    Simple and under standing 🧍‍♂️ 👌

  • @LeilaGharani

    @LeilaGharani

    2 жыл бұрын

    That's great to hear.

  • @girishwavhal6171
    @girishwavhal61713 жыл бұрын

    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..

  • @blackknight6452
    @blackknight64523 жыл бұрын

    Thank you Leila. And happy new year

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Happy new year!

  • @mohammedhassan2808
    @mohammedhassan28083 жыл бұрын

    Amazing tricks

  • @rbfreitas
    @rbfreitas10 ай бұрын

    Great video

  • @rehanahmad1306
    @rehanahmad1306 Жыл бұрын

    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?

  • @praveensharma2632
    @praveensharma26323 жыл бұрын

    One more wonder by Leila.👍

  • @chaddemeuse6760
    @chaddemeuse67602 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    2 жыл бұрын

    Welcome aboard, Chad!

  • @TylerStanczak
    @TylerStanczak3 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    😁

  • @thinkthinktechs1119
    @thinkthinktechs11193 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Wow, thank you!

  • @Veigaburame
    @Veigaburame Жыл бұрын

    you are the legend

  • @NuriaHidalgo
    @NuriaHidalgo3 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    😊

  • @sachitsrinivas03
    @sachitsrinivas032 жыл бұрын

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

  • @undhaddipak
    @undhaddipak3 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    It's my pleasure, Dipak.

  • @joaquinhernandez1205
    @joaquinhernandez12053 жыл бұрын

    Can you use this function with data from a different google sheet? IF so, how do you select the range you want to import?

  • @yukari3305
    @yukari3305 Жыл бұрын

    Thanks and for the sharing Teacher Leila

  • @LeilaGharani

    @LeilaGharani

    Жыл бұрын

    My pleasure!

  • @markk3701
    @markk37013 жыл бұрын

    Most helpful person on KZread

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    I appreciate that! Thank you.

  • @trongpham9999
    @trongpham99993 жыл бұрын

    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.

  • @danjarupath
    @danjarupath3 жыл бұрын

    💕💕💕💕💕 Love your vdo

  • @bradleyhowell3298
    @bradleyhowell32983 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Glad you like it! Welcome aboard :)

  • @hosseinhosseinpoor4845
    @hosseinhosseinpoor48453 жыл бұрын

    thanks..

  • @safashaikh4089
    @safashaikh40893 жыл бұрын

    Wonderful video thanks 👍

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Glad you enjoyed it

  • @chelahjojo4563
    @chelahjojo45632 жыл бұрын

    well done

  • @Augusto_SilvaN
    @Augusto_SilvaN2 жыл бұрын

    Thanks

  • @peterwoods35
    @peterwoods35 Жыл бұрын

    Nice!

  • @davidjr.5584
    @davidjr.55843 жыл бұрын

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

  • @TheTramos00
    @TheTramos003 жыл бұрын

    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

    3 жыл бұрын

    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.

  • @highnickelalloys
    @highnickelalloys2 жыл бұрын

    Thanks!

  • @LeilaGharani

    @LeilaGharani

    2 жыл бұрын

    Thank you!

  • @les.matematika.online
    @les.matematika.online9 ай бұрын

    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

  • @LeilaGharani

    @LeilaGharani

    9 ай бұрын

    Glad it was helpful!

  • @chakralamurali
    @chakralamurali11 ай бұрын

    Excellent madam

  • @sathyamoney
    @sathyamoney3 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    My pleasure 😊

  • @EnglishSquared
    @EnglishSquared2 жыл бұрын

    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.

  • @dennyxhalim
    @dennyxhalim21 күн бұрын

    awesome video, easy to understand, how to add UPPER on the specific Select Column, thank you

  • @LeilaGharani

    @LeilaGharani

    20 күн бұрын

    Glad it was helpful!

  • @Paulydude1
    @Paulydude13 жыл бұрын

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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    You're welcome!

  • @jagdishhaldankar4677
    @jagdishhaldankar46773 жыл бұрын

    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?

  • @syedaliuddin7046

    @syedaliuddin7046

    2 жыл бұрын

    I will say query function

  • @franciscovwilliams
    @franciscovwilliams3 жыл бұрын

    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

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    True 🐱‍👤

  • @williamsusantong798
    @williamsusantong7983 жыл бұрын

    Hi Leila, i’m wondering if it is possible to use query sum based on horizontal month. I have a detailed sheet of total purchase from all suppliers for the year. Col A is the list of supplier B3:M3 is Jan to dec I would like to build a monthly report for sales and purchase in a separate sheet using query+importrange, also with months horizontally. In other word i need to sum(Col) matching the month name. Is it possible?

  • @Stormers000
    @Stormers0002 жыл бұрын

    Can you use QUERY to match a cell with dropdown options?

  • @2JSinc
    @2JSinc3 жыл бұрын

    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

    3 жыл бұрын

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

  • @2JSinc

    @2JSinc

    3 жыл бұрын

    @@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!

Келесі