30 lines
481 B
MySQL
30 lines
481 B
MySQL
|
SET QUOTED_IDENTIFIER ON
|
||
|
GO
|
||
|
SET ANSI_NULLS ON
|
||
|
GO
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
CREATE VIEW FollowupInstances AS
|
||
|
SELECT Followup,
|
||
|
COUNT (DISTINCT BucketToInt.iBucket) AS Buckets,
|
||
|
COUNT (DISTINCT BucketToCrash.CrashId) AS Instances
|
||
|
FROM BucketToCrash, BucketToInt, Followups
|
||
|
WHERE BucketToInt.iBucket = BucketToCrash.iBucket AND
|
||
|
BucketToInt.iBucket = Followups.iBucket
|
||
|
GROUP BY Followup
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
GO
|
||
|
SET QUOTED_IDENTIFIER OFF
|
||
|
GO
|
||
|
SET ANSI_NULLS ON
|
||
|
GO
|
||
|
|