Need a sql query: retrieve all duplicate records in table?



Need a sql query: retrieve all duplicate records in table?..

Answer / ssd

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

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More RPG400 Interview Questions

without logical file we cannot access the data in physical file.but we specify physical file in the program(ie:- Ffile IF E k disk).how can it be accessed?

3 Answers   HSBC, TCS,


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

2 Answers   iGate,


Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.

1 Answers  


1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?

1 Answers   HP,


what is edit word and edit code

0 Answers   Cap Gemini,






what is *place and *auto keyword in prtf ?plz explain

0 Answers   CSC,


if i have three programs progA,progB and progC .now i call progB from progA. but the progB does not exist . now i want to call progC instead of starting dump. how can we achieve this.

10 Answers   Four soft,


1. Which Built-In-Function will you use to achieve the following functionality? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2++÷ResultLenDHHiLoEq C QTY IFLT *ZERO C QTY MULT -1 QTY C ENDIF a) %ABS b) %TRIM c) %TRIMS d) %UNS

3 Answers   IBM,


3 members in databasefile .how to read records from all the members??

6 Answers   CTS,


difference betwen keywords and opcodes

3 Answers  


1..Write an sql query to find the employee name who is having 2 phone numebr? 2.Write an sql query to the the second highest salary of the employee?

4 Answers  


in which journalling which attributes are necessary??/

1 Answers   CTS,


Categories