Archive for November, 2009

Finding Duplicates with SQL

problem:
finding the duplicate within sql

solution:
provide table named subscriber, with elements: email

SELECT COUNT(DISTINCT email) AS NumberOfEmail, email FROM subscriber GROUP BY email HAVING (COUNT(email) > 1)

select NOT in top post sql query

problem:
make some selection in database OTHER THEN top (10) post

solution:  
provide, table named news with element: newsID, newsDate

SELECT * FROM News WHERE (newsID NOT IN (SELECT TOP (10) newsID FROM News AS News_1 ORDER BY newsDate DESC)) ORDER BY newsDate DESC 

 

it will return all post except top 10 post 

Get Adobe Flash playerPlugin by wpburn.com wordpress themes