Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
COUNT(DISTINCT field) OVER (PARTITION BY another_field) - Mailing list pgsql-admin
From
Daniel Cristian Cruz
Subject
COUNT(DISTINCT field) OVER (PARTITION BY another_field)
Date
July 21, 2009
11:19:06
Msg-id
48d0cacb0907210459l4afbfda0jf5074067c8b960c9@mail.gmail.com
Whole thread
Raw
List
pgsql-admin
Tree view
Hi list,
Does someone knows why this is not a supported feature?
I was happily SQL querying when I woke up from my dreams with this message:
ERROR: DISTINCT is not implemented for window functions
LINE 6: COUNT(DISTINCT handle) OVER (PARTITION BY pk_pessoas) AS ha...
It could be very useful to find unique references within groups of clone records. Or there is another way to write this kind of query?
Example (reference is a column of record_data):
SELECT
group_key,
record_data.*,
COUNT(DISTINCT reference) OVER (PARTITION BY group_key) AS unique_references
FROM record_data
ORDER BY
group_key;
Regards,
--
Daniel Cristian Cruz
クルズ クリスチアン ダニエル
pgsql-admin
by date:
Previous
From:
Daniel Cristian Cruz
Date:
21 July 2009, 10:42:13
Subject:
Re: COUNT(DISTINCT field) OVER (PARTITION BY another_field)
Next
From:
Carol Walter
Date:
21 July 2009, 13:35:59
Subject:
Cannot connect to postgresql
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies