Results 1 to 2 of 2

Thread: Criteria Api groupby

  1. #1
    Join Date
    Feb 2011
    Posts
    1

    Criteria Api groupby

    Hi all,

    I have a table which consists of Composite key made up of three columns . Let the columns be A,B,C .Now the situation is to have groupby on three combinations
    1] A,B
    2] A,C
    3] A
    Can this be done through multiple projections on single Criteria call. What are the other options.
    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Posts
    605

    Re: Criteria Api groupby

    I think that most of the databases let you have both an ORDER BY and a GROUP BY on a SELECT statement. For simple queries, such as grouping by department, but sorting by maximum salary in descending order, this might be sufficient. But, for more complex scenarios you will probably have to use a SubQuery. See the "From SubQuery" example in the SubQuery Showcase.

Similar Threads

  1. Karnataka CET Eligibility criteria
    By messi-m in forum Education Career and Job Discussions
    Replies: 1
    Last Post: 09-08-2012, 03:42 PM
  2. What is the criteria for Google PageRank
    By Cordell in forum Technology & Internet
    Replies: 3
    Last Post: 15-01-2011, 04:17 PM
  3. How to sum numbers with certain criteria in Excel
    By Laalamani in forum Windows Software
    Replies: 5
    Last Post: 23-10-2010, 02:31 PM
  4. Criteria to become CBI Officer
    By Markesh in forum Education Career and Job Discussions
    Replies: 8
    Last Post: 20-10-2010, 05:30 PM
  5. Eligibility criteria for MCA
    By Abhiraj in forum Education Career and Job Discussions
    Replies: 3
    Last Post: 10-11-2009, 04:21 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,482,795.77710 seconds with 17 queries