gaps-and-islands
SQL: Get all missing date records from database
I have a DB table with the following structure id | dateCreated | numOfUsers Where a typical row is 1, \'2011-10-13 12:00:00\', 4[详细]
2023-04-13 08:46 分类:问答Concatenate date ranges in SQL (T/SQL preferred)
I need to concatenate rows with a date and a code into a date range Table with two columns that are a composite primary key (date and a code )[详细]
2023-04-03 12:56 分类:问答Group close numbers
I have a table with 2 columns of integers. The first column represents start index and the second column represents end index.[详细]
2023-04-02 01:19 分类:问答SQL to find time elapsed from multiple overlapping intervals
Not using MSSQL or DB2 or Oracle. No CTE. No OVERLAP predicate. No INTERVAL data type. The situation: on a vehicle to be repaired work can not start until[详细]
2023-04-01 12:26 分类:问答Get total time interval from multiple rows if sequence not broken
I have Work and Person tables (these are just examples to understand problem). Structure Work table id INTEGER[详细]
2023-03-31 14:16 分类:问答MySQL: group by consecutive days and count groups
I have a database table which holds each user\'s checkins in cities. I need to know how many days a user has been in a city, and then, how many visits a user has made to a city (a visit consists of co[详细]
2023-03-29 05:22 分类:问答SQL Server 2008, temp tables, cursor
I\'ve been working at this for a while. I was wondering how I could get this table: idopen_dtops_hrs 110/31/20117:00AM - 5:30PM[详细]
2023-03-28 16:22 分类:问答Check for mysql ID skips php
say in mysql I have a column that\'s id, just int auto increment. Is there any way I can use php to tell me when there is an id that\'s been removed?[详细]
2023-03-26 11:33 分类:问答How to determine size of continious range for given criteria?
I have a positions table in SQL Server 2008R2 (definition below). In the system boxes there are positions.[详细]
2023-03-19 23:21 分类:问答MySQL: Find Missing Dates Between a Date Range
I need some help with a mysql query. I\'ve got db table that has data from Jan 1, 2011 thru April 30, 2011. There should be a record for each date. I need to find out whether any date is missing from[详细]
2023-03-16 15:20 分类:问答