Skip to main content
Answer

Can we get a duplicate records count in Generic Inquiry

  • October 22, 2020
  • 2 replies
  • 830 views

Naveen Boga
Captain II
Forum|alt.badge.img+19

Hi Everyone,

 

In Generic Inquiry, is this possible to get the duplicate records count just like below sample SQL query.

 

SELECT username, email, COUNT(*)
FROM users
GROUP BY username, email
HAVING COUNT(*) > 1

Best answer by Gabriel Michaud

Hi @naveenb74 

You won’t be able to o the “HAVING COUNT(*)>1” part in Generic Inquiries, but if you have the count as one of the columns in the results of your inquiry you can filter at the column level.

I don’t have duplicate e-mail addresses in my Users table so I used another table to try out what you’re asking and built a generic inquiry that shows me the count of invoices by customer.

 

And the column filter:

 

2 replies

Gabriel Michaud
Captain II
Forum|alt.badge.img+11

Hi @naveenb74 

You won’t be able to o the “HAVING COUNT(*)>1” part in Generic Inquiries, but if you have the count as one of the columns in the results of your inquiry you can filter at the column level.

I don’t have duplicate e-mail addresses in my Users table so I used another table to try out what you’re asking and built a generic inquiry that shows me the count of invoices by customer.

 

And the column filter:

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Author
  • Captain II
  • October 23, 2020

Thanks a lot, @Gabriel Michaud. This will help us.