I have this query which is showing the ORA-00979:not a GROUP BY expression error. I\'m not a sql pro so please could you give me a hint what\'s wrong ?
This works: SELECT (CASE WHEN x = \'value\' THEN a.col1 ELSE nvl(a.col1, a.col2) END) FROM table1 a WHERE a.this = \'that\'
This question already has answers here: Fetch the rows which have the Max value for a column for each distinct value of another column
I have a query that works on MySQL but doesn\'t work on Oracle, and I\'m trying to convert. This is my table:
This query gives an error: select ep, case when ob is null and b2b_ob is null then \'a\' when ob is not null or b2b_ob is not null then \'b\'
Here is my SELECT query: SELECT a.id_auto, SUM(pozicane_dni * a.poplatok_denny + najazdene_km * a.poplatok_km) celkova_trzba