Count within a time period

The query you require is a very simple SQL statement using the GROUP BY clause. Because you are asking information that needs grouping by date only and also information that needs grouping by date and by technician you should use GROUPING SETS. select year(closed) as year , month(closed) as month , Technician , count(*) as … Read more

T-SQL SEQUENCE runs out, no cycle, what happens?

The documentation you mentioned specifies what happens: “[…] throw an exception when its minimum or maximum value is exceeded” Regarding the error message you can find out using a simple Google search: https://www.google.com/search?q=t-sql+error+messages+sequence The fourth link is https://www.sqlshack.com/sequence-objects-in-sql-server/ and there you can find a screenshot of the error, which has the number 11728. Of course, … Read more