Dataset Viewer
instruction
stringlengths 18
108
| input
stringclasses 1
value | output
stringlengths 32
326
|
---|---|---|
Access clashes by element family for the past month
|
SELECT elementFamily, COUNT(*) AS ClashCount FROM Table_Element WHERE createdDateTime >= DATEADD(MONTH, -1, CAST(GETDATE() AS DATE)) GROUP BY elementFamily
|
|
Access clashes by project phase for the past year
|
SELECT elementPhase, COUNT(*) AS ClashCount FROM Table_Element WHERE createdDateTime >= DATEADD(YEAR, -1, CAST(GETDATE() AS DATE)) GROUP BY elementPhase
|
|
Access clashes by project phase for the past year in ''Zone N''
|
SELECT elementPhase, COUNT(*) AS ClashCount FROM Table_Element WHERE clashGrid='Zone N' AND createdDateTime >= DATEADD(YEAR, -1, CAST(GETDATE() AS DATE)) GROUP BY elementPhase
|
|
Access clashes involving ''Motor'' elements in ''Zone Y''
|
SELECT * FROM Table_Clash WHERE item1='Motor' OR item2='Motor' AND clashGrid='Zone Y'
|
|
Access clashes involving ''Transformer'' elements
|
SELECT * FROM Table_Clash WHERE item1='Transformer' OR item2='Transformer'
|
|
Access the list of clashes in Zone C
|
SELECT * FROM Table_Clash WHERE clashGrid = 'C-4'
|
|
Access the list of clashes in Zone E
|
SELECT * FROM Table_Clash WHERE clashGrid = 'Zone E'
|
|
Access the list of clashes in Zone G
|
SELECT * FROM Table_Clash WHERE clashGrid = 'Zone G'
|
|
Access the list of clashes in Zone I
|
SELECT * FROM Table_Clash WHERE clashGrid = 'Zone I'
|
|
Access the list of clashes in Zone K
|
SELECT * FROM Table_Clash WHERE clashGrid = 'Zone K'
|
|
Access the list of clashes involving structural elements
|
SELECT * FROM Table_Clash WHERE item1 LIKE '%Structural%' OR item2 LIKE '%Structural%'
|
|
Access the summary of clashes per day
|
SELECT CONVERT(DATE, createdDateTime) AS Date, COUNT(*) AS TotalClashes FROM Table_Clash GROUP BY CONVERT(DATE, createdDateTime)
|
|
Access the trend of clashes by element type over the past month
|
SELECT DATEPART(DAY, createdDateTime) AS Day, elementItemType, COUNT(*) AS ClashCount FROM Table_Element WHERE createdDateTime >= DATEADD(MONTH, -1, CAST(GETDATE() AS DATE)) GROUP BY DATEPART(DAY, createdDateTime), elementItemType
|
|
Acquire clashes by element family for the past quarter
|
SELECT elementFamily, COUNT(*) AS ClashCount FROM Table_Element WHERE createdDateTime >= DATEADD(QUARTER, -1, CAST(GETDATE() AS DATE)) GROUP BY elementFamily
|
|
Acquire clashes involving ''Pump'' elements in ''Zone K''
|
SELECT * FROM Table_Clash WHERE item1='Pump' OR item2='Pump' AND clashGrid='Zone K'
|
|
Acquire clashes involving ''Valve'' elements
|
SELECT * FROM Table_Clash WHERE item1='Valve' OR item2='Valve'
|
|
Acquire the breakdown of clashes by item type and status
|
SELECT item1, item2, clashIssue, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY item1, item2, clashIssue
|
|
Acquire the breakdown of clashes by project phase
|
SELECT elementPhase, COUNT(*) AS ClashCount FROM Table_Element GROUP BY elementPhase
|
|
Acquire the breakdown of clashes by status and location
|
SELECT clashIssue, clashGrid, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY clashIssue, clashGrid
|
|
Acquire the breakdown of clashes by status and type
|
SELECT clashIssue, type, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY clashIssue, type
|
|
Acquire the breakdown of clashes by type and status
|
SELECT type, clashIssue, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY type, clashIssue
|
|
Acquire the details of clashes involving pipes in the last week
|
SELECT * FROM Table_Clash WHERE item1 LIKE '%Pipe%' OR item2 LIKE '%Pipe%' AND createdDateTime >= DATEADD(DAY, -7, CAST(GETDATE() AS DATE))
|
|
Acquire the number of clashes resolved this month
|
SELECT COUNT(*) FROM Table_Clash where clashIssue = 'Close' AND updatedDateTime >= DATEADD(MONTH, -1, CAST(GETDATE() AS DATE))
|
|
Acquire the number of clashes resolved this week
|
SELECT COUNT(*) FROM Table_Clash where clashIssue = 'Close' AND updatedDateTime >= DATEADD(DAY, -7, CAST(GETDATE() AS DATE))
|
|
Acquire the trend of clashes by element type over the past week
|
SELECT DATEPART(DAY, createdDateTime) AS Day, elementItemType, COUNT(*) AS ClashCount FROM Table_Element WHERE createdDateTime >= DATEADD(DAY, -7, CAST(GETDATE() AS DATE)) GROUP BY DATEPART(DAY, createdDateTime), elementItemType
|
|
Acquire the trend of clashes by element type over the past week in ''Zone V''
|
SELECT DATEPART(DAY, createdDateTime) AS Day, elementItemType, COUNT(*) AS ClashCount FROM Table_Element WHERE clashGrid='Zone V' AND createdDateTime >= DATEADD(DAY, -7, CAST(GETDATE() AS DATE)) GROUP BY DATEPART(DAY, createdDateTime), elementItemType
|
|
Acquire the trend of clashes by type over the last 3 months
|
SELECT type, COUNT(*) AS ClashCount FROM Table_Clash WHERE createdDateTime >= DATEADD(MONTH, -3, CAST(GETDATE() AS DATE)) GROUP BY type
|
|
Acquire the trend of clashes by zone over the past quarter
|
SELECT DATEPART(MONTH, createdDateTime) AS Month, clashGrid, COUNT(*) AS ClashCount FROM Table_Clash WHERE createdDateTime >= DATEADD(QUARTER, -1, CAST(GETDATE() AS DATE)) GROUP BY DATEPART(MONTH, createdDateTime), clashGrid
|
|
Average distance for resolved clashes
|
SELECT AVG(clashDistance)as AverageDistance from table_clash where clashIssue = 'Close'
|
|
Average distance for unresolved clashes
|
SELECT AVG(clashDistance)as AverageDistance from table_clash Where clashIssue <> 'Close'
|
|
Breakdown of clashes by item type
|
SELECT elementItemType, COUNT(*) AS TotalClashes FROM Table_Element GROUP BY elementItemType
|
|
Calculate the average clash distance
|
SELECT AVG(clashDistance) AS avgDistance FROM Table_Clash WHERE deleteFlg = 0;
|
|
Calculate the number of clashes per day
|
SELECT COUNT(*) AS DailyClashes, CAST(createdDateTime AS DATE) AS Date FROM Table_Clash GROUP BY CAST(createdDateTime AS DATE)
|
|
Calculate the total number of clashes per day
|
SELECT CAST(createdDateTime AS DATE) AS clashDate, COUNT(*) AS clashCount FROM Table_Clash WHERE deleteFlg = 0 GROUP BY CAST(createdDateTime AS DATE);
|
|
Calculate total clashes this month
|
SELECT COUNT(*) AS TotalClashes FROM Table_Clash WHERE createdDateTime >= DATEADD(MONTH, 0, DATEDIFF(MONTH, 0, CAST(GETDATE() AS DATE)))
|
|
Calculate total clashes this quarter
|
SELECT COUNT(*) AS TotalClashes FROM Table_Clash WHERE createdDateTime >= DATEADD(QUARTER, 0, DATEDIFF(QUARTER, 0, CAST(GETDATE() AS DATE)))
|
|
Calculate total clashes this week
|
SELECT COUNT(*) AS TotalClashes FROM Table_Clash WHERE createdDateTime >= DATEADD(DAY, -7, CAST(GETDATE() AS DATE))
|
|
Calculate total clashes this year
|
SELECT COUNT(*) AS TotalClashes FROM Table_Clash WHERE createdDateTime >= DATEADD(YEAR, 0, DATEDIFF(YEAR, 0, CAST(GETDATE() AS DATE)))
|
|
Capture clashes by clash distance for the past quarter
|
SELECT clashDistance, COUNT(*) AS ClashCount FROM Table_Clash WHERE createdDateTime >= DATEADD(QUARTER, -1, CAST(GETDATE() AS DATE)) GROUP BY clashDistance
|
|
Capture clashes by clash level for the past year
|
SELECT clashLevel, COUNT(*) AS ClashCount FROM Table_Clash WHERE createdDateTime >= DATEADD(YEAR, -1, CAST(GETDATE() AS DATE)) GROUP BY clashLevel
|
|
Capture clashes by item category for the past quarter
|
SELECT elementCategory, COUNT(*) AS ClashCount FROM Table_Element WHERE createdDateTime >= DATEADD(QUARTER, -1, CAST(GETDATE() AS DATE)) GROUP BY elementCategory
|
|
Capture clashes by item category for the past quarter in ''Zone R''
|
SELECT elementCategory, COUNT(*) AS ClashCount FROM Table_Element WHERE clashGrid='Zone R' AND createdDateTime >= DATEADD(QUARTER, -1, CAST(GETDATE() AS DATE)) GROUP BY elementCategory
|
|
Capture clashes in ''Zone E''
|
SELECT * FROM Table_Clash WHERE clashGrid='Zone E'
|
|
Capture new clashes per day for the past quarter
|
SELECT DATEPART(DAY, createdDateTime) AS Day, COUNT(*) AS NewClashes FROM Table_Clash WHERE createdDateTime >= DATEADD(QUARTER, -1, CAST(GETDATE() AS DATE)) GROUP BY DATEPART(DAY, createdDateTime)
|
|
Capture new clashes per day for the past quarter in ''Zone C''
|
SELECT DATEPART(DAY, createdDateTime) AS Day, COUNT(*) AS NewClashes FROM Table_Clash WHERE clashGrid='Zone C' AND createdDateTime >= DATEADD(QUARTER, -1, CAST(GETDATE() AS DATE)) GROUP BY DATEPART(DAY, createdDateTime)
|
|
Capture the breakdown of clashes by location and status
|
SELECT clashGrid, clashIssue, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY clashGrid, clashIssue
|
|
Capture the breakdown of clashes by location and type
|
SELECT clashGrid, type, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY clashGrid, type
|
|
Capture the breakdown of clashes by status
|
SELECT clashIssue, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY clashIssue
|
|
Capture the breakdown of clashes by status and location
|
SELECT clashGrid, clashIssue, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY clashGrid, clashIssue
|
|
Capture the breakdown of clashes by status and type
|
SELECT clashIssue, type, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY clashIssue, type
|
|
Capture the breakdown of clashes by type and location
|
SELECT type, clashGrid, COUNT(*) AS ClashCount FROM Table_Clash GROUP BY type, clashGrid
|
|
Capture the longest unresolved clashes
|
SELECT * FROM Table_Clash Where clashIssue <> 'Close' ORDER BY updatedDateTime ASC
|
|
Capture the longest unresolved clashes in ''Critical Area''
|
SELECT * FROM Table_Clash Where clashIssue <> 'Close' AND clashGrid='Critical Area' ORDER BY updatedDateTime ASC
|
|
Capture the most frequent clash components
|
SELECT item1, item2, COUNT(*) AS Frequency FROM Table_Clash GROUP BY item1, item2 ORDER BY Frequency DESC TOP 10
|
|
Capture the summary of clashes per week
|
SELECT DATEPART(YEAR, createdDateTime) AS Year, DATEPART(WEEK, createdDateTime) AS Week, COUNT(*) AS TotalClashes FROM Table_Clash GROUP BY DATEPART(YEAR, createdDateTime), DATEPART(WEEK, createdDateTime)
|
|
Clash details filtered by date
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND createdDateTime BETWEEN '2023-10-01' AND '2023-10-31'
|
|
Clash details with filters by location
|
SELECT * FROM Table_Clash WHERE clashGrid='Zone B'
|
|
Clash details with filters by status
|
SELECT * FROM Table_Clash WHERE clashIssue <> 'Close'
|
|
Clash details with filters by type
|
SELECT * FROM Table_Clash WHERE type='SpecificType'
|
|
Clash details with filters for last week
|
SELECT * FROM Table_Clash WHERE createdDateTime >= DATEADD(WEEK, -1, GETDATE())
|
|
Clash frequency trends (1 month)
|
SELECT CONVERT(DATE, createdDateTime) AS clashDate, COUNT(*) AS clashCount FROM Table_Clash WHERE deleteFlg = 0 AND createdDateTime >= DATEADD(MONTH, -1, CAST(GETDATE() AS DATE)) GROUP BY CONVERT(DATE, createdDateTime)
|
|
Clash frequency trends (2 months)
|
SELECT CONVERT(DATE, createdDateTime) AS clashDate, COUNT(*) AS clashCount FROM Table_Clash WHERE deleteFlg = 0 AND createdDateTime >= DATEADD(MONTH, -2, CAST(GETDATE() AS DATE)) GROUP BY CONVERT(DATE, createdDateTime)
|
|
Clash frequency trends (3 months)
|
SELECT CONVERT(DATE, createdDateTime) AS clashDate, COUNT(*) AS clashCount FROM Table_Clash WHERE deleteFlg = 0 AND createdDateTime >= DATEADD(MONTH, -3, CAST(GETDATE() AS DATE)) GROUP BY CONVERT(DATE, createdDateTime)
|
|
Clashes created by user John
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND createdBy = 'John'
|
|
Clashes created in October 2023
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND createdDateTime BETWEEN '2023-10-01' AND '2023-10-31'
|
|
Clashes in Level 3
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND clashLevel = 'Level 3'
|
|
Clashes involving architectural components
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Architectural' OR item2 = 'Architectural')
|
|
Clashes involving concrete elements
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Concrete' OR item2 = 'Concrete')
|
|
Clashes involving ducts
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Duct' OR item2 = 'Duct')
|
|
Clashes involving electrical components
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Electrical' OR item2 = 'Electrical')
|
|
Clashes involving fire protection components
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Fire Protection' OR item2 = 'Fire Protection')
|
|
Clashes involving HVAC components
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'HVAC' OR item2 = 'HVAC')
|
|
Clashes involving mechanical components
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Mechanical' OR item2 = 'Mechanical')
|
|
Clashes involving MEP components
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 IN ('Mechanical', 'Electrical', 'Plumbing') OR item2 IN ('Mechanical', 'Electrical', 'Plumbing'))
|
|
Clashes involving pipes
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Pipe' OR item2 = 'Pipe')
|
|
Clashes involving plumbing components
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Plumbing' OR item2 = 'Plumbing')
|
|
Clashes involving specific categories
|
SELECT * FROM Table_Element WHERE deleteFlg = 0 AND elementCategory = 'Structural'
|
|
Clashes involving specific coordinates
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND clashPointX BETWEEN 100 AND 200 AND clashPointY BETWEEN 300 AND 400
|
|
Clashes involving specific families
|
SELECT * FROM Table_Element WHERE deleteFlg = 0 AND elementFamily = 'Pipes'
|
|
Clashes involving specific files
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND orgFile = 'FileA.rvt'
|
|
Clashes involving specific grids
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND clashGrid = 'Grid1'
|
|
Clashes involving specific item ''Pipe''
|
SELECT * FROM Table_Element WHERE elementItemType='Pipe'
|
|
Clashes involving specific items
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND (item1 = 'Pipe' OR item2 = 'Pipe')
|
|
Clashes involving specific layers
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND clashLevel = 'Level 2'
|
|
Clashes involving specific levels
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND clashLevel = 'Level1'
|
|
Clashes involving specific phases
|
SELECT * FROM Table_Element WHERE deleteFlg = 0 AND elementPhase = 'Construction'
|
|
Clashes involving specific tests
|
SELECT * FROM Table_Clash WHERE deleteFlg = 0 AND = 'Test123'
|
|
Clashes involving specific tests with high active clashes
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND active > 10
|
|
Clashes involving specific tests with high approved clashes
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND approved > 10
|
|
Clashes involving specific tests with high frequency
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 100
|
|
Clashes involving specific tests with high frequency and high risk
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active > 10
|
|
Clashes involving specific tests with high frequency and high risk and high tolerance
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active > 10 AND tolerance > 20
|
|
Clashes involving specific tests with high frequency and high risk and high tolerance and high total clashes
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active > 10 AND tolerance > 20 AND totalClashes > 100
|
|
Clashes involving specific tests with high frequency and high risk and low tolerance
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active > 10 AND tolerance < 5
|
|
Clashes involving specific tests with high frequency and high risk and no tolerance
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active > 10 AND tolerance = 0
|
|
Clashes involving specific tests with high frequency and low risk
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active = 0
|
|
Clashes involving specific tests with high frequency and low risk and high tolerance
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active = 0 AND tolerance > 20
|
|
Clashes involving specific tests with high frequency and low risk and high tolerance and high total clashes
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active = 0 AND tolerance > 20 AND totalClashes > 100
|
|
Clashes involving specific tests with high frequency and low risk and low tolerance
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active = 0 AND tolerance < 5
|
|
Clashes involving specific tests with high frequency and low risk and no tolerance
|
SELECT * FROM Table_ClashTest WHERE deleteFlg = 0 AND totalClashes > 50 AND active = 0 AND tolerance = 0
|
End of preview. Expand
in Data Studio
No dataset card yet
- Downloads last month
- 2