sql last value in table then count code example Example: how to count number of rows in sql SELECT COUNT(*) FROM dbo.bigTransactionHistory;