Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Select query for rows where condition > 1

$
0
0

Say I have a table, tb1, that has the following entries:

FNameLNameCode
JohnDoe xxx
JaneDoe xxx
SteveHarper x
BarrakObama x
GeorgeBush xxxx
BillClinton xx

I'd like to write a select query that only lists the rows where the count for Code is > 1, i.e not display the last two rows from the above entry. How would I go about writing that select query.

Thanks.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>