Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How can I use GROUP BY and ORDER BY in a single query?

    Tagged: Account, Salesforce Query, Salesforce Records

    • Salesforce® Discussions

      How can I use GROUP BY and ORDER BY in a single query?

      Posted by PRANAV on August 19, 2016 at 1:19 PM

      Hi All,

      How can I use Group By and Order By in a single query?

      As I want to group the account records and ordered it by their id.

      Thanks

      Piyush replied 10 years, 1 month ago 2 Members · 1 Reply
      • Account
      • Salesforce Query
      • Salesforce Records
    • 1 Reply
    • Piyush

      Member
      August 22, 2016 at 12:24 PM

      Hello ,

      You can use GROUP BY and ORDER BY in a single query. Here is the sample of Query :-

      SELECT Name  FROM Account GROUP BY name ORDER BY Name LIMIT 2

      Thanks.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    How Salesforce Sales Cloud changed the Sales Process at the EV Company?

    Blog in Salesforce

    The effectiveness of a company's sales operations can make or break it in the fiercely competitive Electric Vehicle (EV) market. Because of their complicated goods…

    Bottom Line, Clients, Collaboration, Collaboration Tools, Complex Goods
    Hennery cavil May 10, 2023
    1,435  Views

    All You Need To Know About Salesforce & Quip Integration

    Blog in Salesforce, Salesforce integration

    When Salesforce bought Quip in 2016, users have been waiting for software upgrades that will boost collaborative and productive possibilities. Fortunately, these big integrations were…

    App, Best Integration, Better Communication, Big Integrations, Boost Company Performance
    Apphienz Aug 19, 2021
    2,466  Views

    Best SMS App for Salesforce: Features and Benefits

    Blog in Salesforce

    In today’s time, companies are supposed to keep their customers updated with every little bit of information. They must thrive on quick, effective, and seamless…

    AppExchange, SMSApp
    Ksolves Aug 1, 2025
    501  Views

    Popular Salesforce Videos

    What is Apex? | Way to become a Salesforce Developer

    What is Apex? | Way to become a Salesforce Developer

    Video in Salesforce Apex, Salesforce Training

    Apex is a development platform for building software as a service (SaaS) applications on top of Salesforce's customer relationship management (CRM) functionality. Apex allows developers…

    Salesforce Apex, salesforce training videos for beginners, Salesforce Developer, Salesforce CRM, Salesforce Tutorials
    Jogender Jun 8, 2018
    3,741  Views
    Passed Salesforce Certification Exam in First Attempt

    Passed Salesforce Certification Exam in First Attempt

    Video in Salesforce Certifications, Salesforce Training

    Salesforce certifications come in all shapes and sizes, so nearly anyone who works in Salesforce and wants to learn more about the tool can find…

    Salesforce Training, Salesforce Certification, salesforce, salesforce platform, Salesforce Video
    Jogender Jun 19, 2020
    1,832  Views
    How To Log Cases In Salesforce (Email-to-Case) | Salesforce Tutorial

    How To Log Cases In Salesforce (Email-to-Case) | Salesforce Tutorial

    Video in Salesforce Training

    How to log cases in Salesforce (Email-to-Case). In this video, the following points will be covered - 1. Enable Email-To-Case Get a brief introduction on…

    Salesforce Training, Salesforce Tutorial, Email Templates, Salesforce Video, email to case
    Algoworks Aug 9, 2021
    2,719  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.