I am running an query to count number of a specific failure by week. I need data for only one ProductFamily and that information is available in a seperate view and I used join to obtain that data. The query runs without any errors but it keeps executing without any output. Is this a server issue or is my code wrong?
<code>SELECT
DATEPART(ISO_WEEK, DateTime) AS WEEKNUM,
COUNT(*) AS Failcount
FROM
dbo.[Chip_Cognex_Result_Detail]
INNER JOIN
Report.[V_PipelineData_WaferCounted_ChipProduction]
ON
dbo.[Chip_Cognex_Result_Detail].wafer = Report.[V_PipelineData_WaferCounted_ChipProduction].WaferID
WHERE
dbo.[Chip_Cognex_Result_Detail].FailMode LIKE 'FIDBC%%'
AND YEAR(DateTime) = 2024
AND Report.[V_PipelineData_WaferCounted_ChipProduction].ProductFamily = 'RWG_25G_175'
GROUP BY
DATEPART(ISO_WEEK, DateTime)
</code>
<code>SELECT
DATEPART(ISO_WEEK, DateTime) AS WEEKNUM,
COUNT(*) AS Failcount
FROM
dbo.[Chip_Cognex_Result_Detail]
INNER JOIN
Report.[V_PipelineData_WaferCounted_ChipProduction]
ON
dbo.[Chip_Cognex_Result_Detail].wafer = Report.[V_PipelineData_WaferCounted_ChipProduction].WaferID
WHERE
dbo.[Chip_Cognex_Result_Detail].FailMode LIKE 'FIDBC%%'
AND YEAR(DateTime) = 2024
AND Report.[V_PipelineData_WaferCounted_ChipProduction].ProductFamily = 'RWG_25G_175'
GROUP BY
DATEPART(ISO_WEEK, DateTime)
</code>
SELECT
DATEPART(ISO_WEEK, DateTime) AS WEEKNUM,
COUNT(*) AS Failcount
FROM
dbo.[Chip_Cognex_Result_Detail]
INNER JOIN
Report.[V_PipelineData_WaferCounted_ChipProduction]
ON
dbo.[Chip_Cognex_Result_Detail].wafer = Report.[V_PipelineData_WaferCounted_ChipProduction].WaferID
WHERE
dbo.[Chip_Cognex_Result_Detail].FailMode LIKE 'FIDBC%%'
AND YEAR(DateTime) = 2024
AND Report.[V_PipelineData_WaferCounted_ChipProduction].ProductFamily = 'RWG_25G_175'
GROUP BY
DATEPART(ISO_WEEK, DateTime)
New contributor
Raijin Asura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.