QUERY Function in Google Sheets - 2024 Tutorial ✏️

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2025

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

  • @KSUMCEngineering
    @KSUMCEngineering 10 หลายเดือนก่อน +3

    Perfect quick and direct to the point presentation

    • @coupleracademy
      @coupleracademy  10 หลายเดือนก่อน

      Glad you liked it! :)

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

    Penjelasannya sangat mudah dimengerti, ringkas dan cepat. Channel rekomendasi untuk belajar lebih lanjut mengenai Google Sheets. Sangat mudah bagi saya untuk mengaplikasikannya, terima kasih banyak 😍👌👍

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

    Really nice rapid summary of how to use Query

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

      our pleasure, check out other vudeo tutorials on our channel, we cover different Google Sheets functions and mucn more!

  • @madisonandhouston
    @madisonandhouston 10 หลายเดือนก่อน

    THANK YOU SOOO MUCH! a paid Coursera course couldn't have explained it better!

    • @coupleracademy
      @coupleracademy  10 หลายเดือนก่อน

      Thank you for such a lovely comment, we're so happy you enjoyed our content. Come back for more :)

  • @user-Appdraft100
    @user-Appdraft100 2 หลายเดือนก่อน

    Thank you. Coming from an Excel background this is just what I needed to replicate the Excel subtotal function.

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

    Thank you. This is the prefect video I was lookiing for when I am trying to migrte from excel and the query fuction is so much more versatile. Could also do video on IMPORTHTML

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

      Hi! Thank you so much and glad you enjoyed our video. We don't have anything on IMPORTHTML planned at the moment but we'll definitely note your request and will discuss it with the team. Thanks again!

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

    Thank you

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

      you're welcome, check back for more interesting content soon :)

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

    Thanks alot,🤩

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

    great tutorial. Can this be used in App script to fetch data and show the reports ?

    • @coupleracademy
      @coupleracademy  8 หลายเดือนก่อน +1

      Thanks for the great feedback! 😊 Yes, you can use the QUERY function in Google Apps Script to fetch data and generate reports. You'll use the SpreadsheetApp service to access your data and then apply the QUERY function to manipulate it. It's super handy for automating tasks and creating dynamic reports. If you need any help getting started, let us know!

  • @indradutta4136
    @indradutta4136 10 หลายเดือนก่อน

    to import from a different sheet if I need to select col A:D & column H how will go about it..apart from writing the column name like col1,col2 and so on

    • @coupleracademy
      @coupleracademy  10 หลายเดือนก่อน

      Hi! The simplest way is to probably set as a range an array with all columns you want to fetch and then SELECT *, for example
      =QUERY({Sheet1!A1:D, Sheet1!H1:H}, "SELECT *")

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

    This is beautifully done but doesn't work for me and I can't figure out why... when I try to add the curly braces inside the query function, my version of google sheets auto add "ArrayFormula(" syntax to the beginning of the function and therefore ignores the semi-colons that combines data from multiple sheets. Any ideas on how to resolve?

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

      I haven't encountered such an issue with auto-adding an arrayformula function. However, you could try to specify the ranges first and then add curly braces to the formula. I hope this trick will help you resolve the issue.

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

    How do you put in spacer columns or a static NULL column?

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

      Hi! You can use ' ' (single quotes) for empty columns or NULL for null columns. For example:
      =QUERY(A:D, "SELECT A, '', B, NULL, C")

  • @Udittotla
    @Udittotla 2 หลายเดือนก่อน

    Can we use windows function in this?

    • @coupleracademy
      @coupleracademy  2 หลายเดือนก่อน

      unfortunately no, to apply window functions you'll need to use BigQuery or other similar platform

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

    Can we do the column concatenation in query and how

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

      Hi! Unfortunately QUERY doesn't support concatenation. You may need to use a workaround, maybe this one helps? stackoverflow.com/questions/42571114/how-to-use-concat-in-query

  • @RTRT-jr8jv
    @RTRT-jr8jv 10 หลายเดือนก่อน

    Hi, how can I get C + 30 days using sheets query and C is text(not date) with YYYY-MM-DD,HH:MM:SS format?

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

      Hey there! Great question! 😊 You can add 30 days to a date in text format using a combination of QUERY and DATE functions. Here's how you can do it:
      1. Convert the text to a date:
      =DATEVALUE(LEFT(C1, 10)) + 30
      This converts the text date in C1 to a date and adds 30 days.
      2. Use this in a QUERY:
      =QUERY(A:D, "SELECT A, B, C, DATEVALUE(LEFT(C, 10)) + 30 WHERE ...", 1)
      Replace A:D with your range and adjust the SELECT statement as needed. Let me know if you need more help!

    • @RTRT-jr8jv
      @RTRT-jr8jv 8 หลายเดือนก่อน

      @@coupleracademy Thank you for trying to help but DATEVALUE(LEFT(C, 10)) function is not allowed in QUERY

  • @RuthRange-f8w
    @RuthRange-f8w 2 หลายเดือนก่อน

    Why are my dates not extracted into separate columns??
    =QUERY(Sheet3!A:H,"SELECT A, E, G, MONTH(G), DAY(G), YEAR(G), DAYOFTHEWEEK(G)")

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

      Hi! QUERY doesn't support functions like MONTH(), DAY(), etc. To extract these details, you would need to create helper columns and then reference them in SELECT statement. For example:
      Helper column: I: =MONTH(F2)
      And then =QUERY(Sheet3!A:H,"SELECT A, E, G, I...)

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

    thanks

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

    For anyone getting error when trying to use QUERY functions, replace the comma separator for the semicolon separator.

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

      Thanks for the helpful tip! Regional settings can cause issues with separators. Switching from commas to semicolons is a great solution for those experiencing errors in QUERY syntax.

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

    This is so correct until I use Label BEFORE the end of the query like so :
    (
    =QUERY(Invoices_Extracted_on_2024.07.21!A1:L,"SELECT Col"&XMATCH("INVOICE_ID",header)&", Col"&XMATCH("Date",header)&", Col"&XMATCH("Invoice#",header)&", Col"&XMATCH("Customer Name",header)&", Col"&XMATCH("Invoice Status",header)&", Col"&XMATCH("Due Date",header)&", Col"&XMATCH("Due Days",header)&", Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&" LABEL Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&" 'Discount', Col"&XMATCH("Invoice Amount",header)&", Col"&XMATCH("Balance",header)&", Col"&XMATCH("Adjustment",header)&", Col"&XMATCH("Created By",header))
    )
    Although, when I use Label at the END it works correctly like in this function :
    (
    =QUERY(Invoices_Extracted_on_2024.07.21!A1:L,"SELECT Col"&XMATCH("INVOICE_ID",header)&", Col"&XMATCH("Date",header)&", Col"&XMATCH("Invoice#",header)&", Col"&XMATCH("Customer Name",header)&", Col"&XMATCH("Invoice Status",header)&", Col"&XMATCH("Due Date",header)&", Col"&XMATCH("Due Days",header)&", Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&" LABEL Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&" 'Discount'")
    )
    Finishing both calculated column and leaving the labeling to the end doesn't work :/
    (
    =QUERY(Invoices_Extracted_on_2024.07.21!A1:L,"SELECT Col"&XMATCH("INVOICE_ID",header)&", Col"&XMATCH("Date",header)&", Col"&XMATCH("Invoice#",header)&", Col"&XMATCH("Customer Name",header)&", Col"&XMATCH("Invoice Status",header)&", Col"&XMATCH("Due Date",header)&", Col"&XMATCH("Due Days",header)&", Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&", Col"&XMATCH("Balance",header)&" - Col"&XMATCH("Invoice Amount",header)&", Col"&XMATCH("Balance",header)&", Col"&XMATCH("Adjustment",header)&", Col"&XMATCH("Created By",header)&" LABEL Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&" 'Discount' )")
    )
    *WORKING Here*
    (
    =QUERY(Invoices_Extracted_on_2024.07.21!A1:L,"SELECT Col"&XMATCH("INVOICE_ID",header)&", Col"&XMATCH("Date",header)&", Col"&XMATCH("Invoice#",header)&", Col"&XMATCH("Customer Name",header)&", Col"&XMATCH("Invoice Status",header)&", Col"&XMATCH("Due Date",header)&", Col"&XMATCH("Due Days",header)&", Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&", Col"&XMATCH("Balance",header)&" - Col"&XMATCH("Invoice Amount",header)&", Col"&XMATCH("Balance",header)&", Col"&XMATCH("Adjustment",header)&", Col"&XMATCH("Created By",header)&" LABEL"&" Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&"'Disciount Amount', Col"&XMATCH("Balance",header)&" - Col"&XMATCH("Invoice Amount",header)&"'Paid sum'")
    )

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

      Hi! It looks like there might be a syntax issue when using multiple LABEL statements with calculated columns. Ensure you have proper spacing and syntax. Here’s a corrected example:
      =QUERY(Invoices_Extracted_on_2024.07.21!A1:L, "SELECT Col"&XMATCH("INVOICE_ID",header)&", Col"&XMATCH("Date",header)&", Col"&XMATCH("Invoice#",header)&", Col"&XMATCH("Customer Name",header)&", Col"&XMATCH("Invoice Status",header)&", Col"&XMATCH("Due Date",header)&", Col"&XMATCH("Due Days",header)&", Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&", Col"&XMATCH("Invoice Amount",header)&", Col"&XMATCH("Balance",header)&" - Col"&XMATCH("Invoice Amount",header)&", Col"&XMATCH("Balance",header)&", Col"&XMATCH("Adjustment",header)&", Col"&XMATCH("Created By",header)&" LABEL Col"&XMATCH("Invoice Amount",header)&" - Col"&XMATCH("Sub Total",header)&" 'Discount', Col"&XMATCH("Balance",header)&" - Col"&XMATCH("Invoice Amount",header)&" 'Paid sum'")
      The key is to ensure each LABEL is correctly associated with its column, and there’s proper spacing and punctuation.

    • @selhadinabdibeker8216
      @selhadinabdibeker8216 วันที่ผ่านมา

      I don't know how fast can this be responded but can someone please tell me how can I pull data by name and month, like All john sells in January and all jones in feb etc... please.