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

    Empowering Customer Engagement: Unleashing AI in Salesforce CRM

    Blog in Salesforce

    In today's data-driven world, the fusion of artificial intelligence (AI) with customer relationship management (CRM) is transforming the landscape of customer service, engagement, and retention.…

    Artificial Intelligence, Automated Workflows, Business Growth, Case Study, CRM
    CRMJetty Oct 23, 2023
    2,252  Views

    Salesforce's Top 10 Summer '21 Release Features

    Blog in Salesforce Releases

    In the digital-first world, things change at the speed of light. New technologies, software, techniques are innovated, upgraded, and updated every day. One must keep…

    Assignments, AURA, Auto-populated Proposal, Automate Pricing Proposals, Bookkeeping
    Apphienz May 19, 2021
    2,091  Views

    How to get a chatter "sharing via link" URL?

    Blog in Salesforce Apex

    How to get a chatter "sharing via link" URL which can be accessed by anyone inside or outside of your company? This can be achieved…

    Chatter File, Chatter File Url, Chatter REST API, ContentDistribution, DistributionPublicUrl
    Madhu Jul 16, 2018
    4,713  Views

    Popular Salesforce Videos

    Power of Personal Brand | The Shrey Sharma Show | Salesforce

    Power of Personal Brand | The Shrey Sharma Show | Salesforce

    Video in Salesforce Training

    Shrey is a Chief Executive Officer at Cyntexa, a SILVER Salesforce Consulting Partner in the USA, UK, UAE, Australia, Singapore & India, having a vibrant…

    Salesforce Training, Salesforce Certification, Salesforce Developer, salesforce, Salesforce Course
    S2 Nov 29, 2021
    1,739  Views
    Opportunity Manager for Salesforce

    Opportunity Manager for Salesforce

    Video in Others

    Opportunity Manager for Salesforce - The first opportunity manager app that has taken the initiative of converting information and data in the form of user-friendly…

    Salesforce Case Management, salesforce services, Salesforce Apps, Salesforce Data Management, Salesforce Service Cloud Case Management
    lavish Jun 11, 2019
    2,222  Views
    How to Find Volunteer Work as a Salesforce Professional

    How to Find Volunteer Work as a Salesforce Professional

    Video in Salesforce Training

    In this video, Brad discusses how to generate work experience through volunteer jobs. These jobs allow for new professionals to gain Salesforce specific, applicable knowledge…

    Salesforce Training, Salesforce Jobs, Salesforce Certification, salesforce, salesforce knowledge
    Bradley May 6, 2020
    2,097  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.