Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
islands and gaps problem
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
--Sql Server 2014 Express Edition --Batches are separated by 'go' create table tab( periodDate DateTimeOffset(7), LocationEventId uniqueIdentifier, LocationEventName varchar(50), ImplicitRisk int, QcReadyRisk int, IsQualityControlReady int, ActivePeriod bit); INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-03-04T00:00:00.0000000+08:00' AS DateTimeOffset), N'175036be-036e-4173-bfc4-694242137128', N'CP-416', 0, 0, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-03-10T00:00:00.0000000+00:00' AS DateTimeOffset), N'175036be-036e-4173-bfc4-694242137128', N'CP-416', 0, 0, 1, 0) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-03-10T16:00:00.0000000+00:00' AS DateTimeOffset), N'175036be-036e-4173-bfc4-694242137128', N'CP-416', 0, 0, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-03-17T00:00:00.0000000+08:00' AS DateTimeOffset), N'6fcad4c5-a984-4340-968c-9f01316f220e', N'CPWJ40-A', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-03-20T00:00:00.0000000+08:00' AS DateTimeOffset), N'6fcad4c5-a984-4340-968c-9f01316f220e', N'CPWJ40-A', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-04-21T19:30:00.0000000+08:00' AS DateTimeOffset), N'1a95ed93-6aa3-4ebe-a4ca-4b3dab6b55d6', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-04-22T00:00:00.0000000+08:00' AS DateTimeOffset), N'1a95ed93-6aa3-4ebe-a4ca-4b3dab6b55d6', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-04-22T00:00:01.0000000+08:00' AS DateTimeOffset), N'1a95ed93-6aa3-4ebe-a4ca-4b3dab6b55d6', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-04-29T16:00:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-04-30T04:30:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-01T00:00:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-01T00:00:01.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-01T08:00:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-02T02:00:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 30, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-03T11:15:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-06T00:00:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-06T00:00:01.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-08T00:00:00.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-08T00:00:01.0000000+08:00' AS DateTimeOffset), N'd8303df2-040d-4caa-97a0-71a70d28e94e', N'CP-413', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-10T12:00:00.0000000+08:00' AS DateTimeOffset), N'9fff3226-dacb-486d-9d4b-ef958e825763', N'CP-414ST1', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-10T12:45:00.0000000+08:00' AS DateTimeOffset), N'9fff3226-dacb-486d-9d4b-ef958e825763', N'CP-414ST1', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-12T20:00:00.0000000+08:00' AS DateTimeOffset), N'9fff3226-dacb-486d-9d4b-ef958e825763', N'CP-414ST1', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-15T00:00:00.0000000+08:00' AS DateTimeOffset), N'9fff3226-dacb-486d-9d4b-ef958e825763', N'CP-414ST1', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-15T00:00:01.0000000+08:00' AS DateTimeOffset), N'9fff3226-dacb-486d-9d4b-ef958e825763', N'CP-414ST1', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-20T00:00:00.0000000+08:00' AS DateTimeOffset), N'45a4b2bc-8812-4f52-9109-77af0f813412', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-20T00:00:01.0000000+08:00' AS DateTimeOffset), N'45a4b2bc-8812-4f52-9109-77af0f813412', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-21T09:45:00.0000000+00:00' AS DateTimeOffset), N'45a4b2bc-8812-4f52-9109-77af0f813412', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-29T00:00:00.0000000+08:00' AS DateTimeOffset), N'45a4b2bc-8812-4f52-9109-77af0f813412', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-05-29T00:00:01.0000000+08:00' AS DateTimeOffset), N'45a4b2bc-8812-4f52-9109-77af0f813412', N'CP-411', 20, 20, 1, 1) INSERT [dbo].[tab] ([periodDate], [LocationEventId], [LocationEventName], [ImplicitRisk], [QcReadyRisk], [IsQualityControlReady], [ActivePeriod]) VALUES (CAST(N'2019-06-01T00:00:00.0000000+08:00' AS DateTimeOffset), N'e608896a-8d23-4cf5-a8c9-33c02b4a499f', N'CP-412', 20, 20, 1, 1) SELECT * FROM Tab
View schema
Execution time: 0,02 sec, rows selected: 3, rows affected: 13, absolute service time: 0,2 sec
edit mode
|
history
|
discussion
Start
End
Severity
1
10.09.2018 00:00:00
15.09.2018 00:00:00
40
2
16.09.2018 00:00:00
18.09.2018 00:00:00
20
3
19.09.2018 00:00:00
22.09.2018 00:00:00
30