Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Best way to randomly select rows?

$
0
0
select SUM(c_amount) from Transactions
where s_credit_tran_type = 'cash' and b_cancel = 0 and b_credit = 0 and b_failed = 0 and dt_when between '2017-01-01 04:09:54.213' and '2017-01-31 02:09:54.213'

The query gives me SUM(c_amount) equal to

Viewing all articles
Browse latest Browse all 3145

Trending Articles