How to select the max value after a count in oracle?

Member

by lizzie , in category: MySQL , 8 months ago

How to select the max value after a count in oracle?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by daisha , 8 months ago

@lizzie 

To select the maximum value after performing a count in Oracle, you can use the following query:

1
2
3
4
5
6
SELECT MAX(cnt)
FROM (
    SELECT COUNT(column_name) as cnt
    FROM table_name
    GROUP BY column_name
);


In this query:

  1. Replace column_name and table_name with the specific column and table name from which you are counting values.
  2. The inner query counts the occurrences of each value in the specified column.
  3. The outer query then selects the maximum count value from the result of the inner query.


This query will give you the maximum count value obtained from the count operation in Oracle.

Related Threads:

How to get the max value from count value in sql oracle?
How to do a count and select variables in sparql?
How to get max and min value of a column from database in codeigniter?
How to select previous column value in mysql?
How to insert the multi-select value in codeigniter?
How to count each week data in oracle?