skip to Main Content

Min dates from group by postgresql

I have table with data: create table measure_app_scalemeasurement ( store_code text, certificate_id text, audit_ending date); insert into measure_app_scalemeasurement values ('K010','vwv', '10.12.2023'), ('K010','cert1','12.12.2023'), ('K054','vwv', '14.12.2023'), ('K054','cert1','20.01.2024'); I want to select min audit_ending date for each market store_code, also getting its corresponding…

VIEW QUESTION

Mysql – How do I fix this "Error in From clause"?

for this specific problem I had to enter the query: SELECT ProductName, Quantity FROM Products JOIN OrderDetails on OrderDetails.Productid= Products.Productid WHERE Quantity <5 On the website: https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all The question that I got this query from from was "Can you modify…

VIEW QUESTION

Extract value from JSON array using Snowflake sql

Snowflake table has a varchar column with following JSON array as value. [{"$":6394.2,"@":"decisionMetricValue","@id":"Month 1"},{"$":6672.25,"@":"decisionMetricValue","@id":"Month 2"},{"$":5643.05,"@":"decisionMetricValue","@id":"Month 3"},{"$":5564.79,"@":"decisionMetricValue","@id":"Month 4"},{"$":6966.75,"@":"decisionMetricValue","@id":"Month 5"},{"$":7605.15,"@":"decisionMetricValue","@id":"Month 6"}] Using snowflake sql, I would like to extract data in following format. Month1,Month2,Month3,Month4,Month5,Month6 6394.2,6672.25,5643.05,5564.79,6966.75,7605.15 I was trying to implement solution https://stackoverflow.com/a/77319223/20535715…

VIEW QUESTION
Back To Top
Search