oracle list duplicates 1

oracle list duplicates

    COUNT(*) OVER (PARTITION BY fruit_name, color) c
FROM fruits f;

Here is what the above code is Doing:
1. We’re using the OVER clause to partition the data by fruit_name and color.
2. We’re using the COUNT() function to count the number of rows in each partition.
3. We’re using the PARTITION BY clause to specify the columns to partition by.

Similar Posts