Search
 
SCRIPT & CODE EXAMPLE
 

SQL

select rows with same value in a column

select * from table where email in (
    select email from table
    group by email having count(*) > 1
)
Comment

select rows with same value in a column

SELECT email,
       count(*) AS c
FROM TABLE
GROUP BY email
HAVING c > 1
ORDER BY c DESC
Comment

PREVIOUS NEXT
Code Example
Sql :: SQLSTATE[IMSSP]: The active result for the query contains no fields. 
Sql :: mysql show table structure 
Sql :: oracle trigger 
Sql :: spring datasource properties mysql 
Sql :: grant all privileges on a db 
Sql :: sql substring before last occurrence of character 
Sql :: laravel get sql query eloquent with parameters 
Sql :: start mysql 
Sql :: update mongodb version ubuntu 
Sql :: sqlite woth cmake 
Sql :: duplicate records in sql 
Sql :: dateadd in sql 
Sql :: mysql add column with default value 
Sql :: mysql create database utf8 
Sql :: DB: in eloquent using sql 
Sql :: get date from timestamp oracle 
Sql :: savepoint in sql 
Sql :: current date sql 
Sql :: postgresql update auto_increment value 
Sql :: select first and last row sql 
Sql :: sql case 
Sql :: postgresql size of database 
Sql :: SELECT exists sql 
Sql :: mysql event last execution 
Sql :: sql table 
Sql :: sql server alter table add column tinyint 
Sql :: oracle apex view logs 
Sql :: mysql check if lowercase 
Sql :: SQL ORDER BY DESC (Descending Order) 
Sql :: rename table column name in mysql 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =