I have following SQL statement which gives me the right result:
SELECT CASE WHEN PART_NO LIKE '1%' THEN 'A' WHEN PART_NO LIKE '2%' THEN 'B' WHEN PART_NO LIKE '3%' THEN 'C' END PART_TYPE,
MAX(PART_NO) PART_NO FROM PART_CATALOG WHERE (PART_NO LIKE '1%' OR PART_NO LIKE '2%' OR PART_NO LIKE '3%')
GROUP BY CASE WHEN PART_NO LIKE '1%' THEN 'A' WHEN PART_NO LIKE '2%' THEN 'B' WHEN PART_NO LIKE '3%' THEN 'C' END
How would this convert to definition of a Lobby Data Source (with view Part_Catalog) regarding Condition and Group By?