• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Digital Answers

How to tech tutorials in simple words

  • Home
  • About Us
  • Disclaimer
  • Privacy Policy

How to limit results returned by Query function in Google Spreadsheet

September 5, 2011 by Admin Leave a Comment

We had already seen brief introduction about using Query function in Google Spreadsheet. Let us see how to limit the number of rows returned using Query Function with the following sample data of batsman with maximum runs in test cricket.

Now if you want to get the top 3 batsman with maximum number of runs scored, then you can use

=QUERY(C3:G13,”select C,G limit 3″)

The limit keyword will reduce the number of results returned to 3.

But say if you want to get the list of top 3 batsman with maximum averages then need to use the Order by clause.

=QUERY(C3:G13,”select C,F order by F desc limit 3″)

The above query would first sort the list using Order by clause and then uses the limit keyword to get the Top results.

Filed Under: Excel, Technical Tagged With: Google Spreadsheet, Limit, Order by, Query, results

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • Digital Photography for Seniors: Capturing and Sharing Memories
  • Learning New Skills Online: Websites and Platforms for Seniors
  • How to Use a Password Manager Effectively
  • Social Media Usage Tips and Tricks for a Balanced Life
  • Wi-Fi Optimization Tips and Tricks for Home Users

blogmines.com Copyright © 2023