79500799

Date: 2025-03-11 12:51:47
Score: 0.5
Natty:
Report link

Using CASE WHEN col1 = 'b' THEN 1 ELSE 0 END to flag 'b' values, aggregating these flags per FKey with COUNT(), and applying a HAVING clause filters groups where 'b' appears more than once.

SELECT FKey
FROM your_table
GROUP BY FKey
HAVING COUNT(CASE WHEN col1 = 'b' THEN 1 END) > 1;

output:

FKey
-----
11
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Kamran Khalid