|
|
|
|
|
by anonzzzies
718 days ago
|
|
I have worked on this idea for almost 2 years now and the problem I have found is; like APL, numpy and others, sql is a language of thought. Once understood even a bit, english is vastly less efficient. How are your experiences with this? |
|
Here's my prompt and the query:
-- distribution of byte sizes of sessions without review with avg, median, p90, p95, and p99 -- ERROR: column "blob_stream" does not exist``` SELECT percentile_cont(0.5) WITHIN GROUP (ORDER BY octet_length(blob_stream_id::text)) AS median, percentile_cont(0.9) WITHIN GROUP (ORDER BY octet_length(blob_stream_id::text)) AS p90, percentile_cont(0.95) WITHIN GROUP (ORDER BY octet_length(blob_stream_id::text)) AS p95, percentile_cont(0.99) WITHIN GROUP (ORDER BY octet_length(blob_stream_id::text)) AS p99, avg(octet_length(blob_stream_id::text)) AS avg FROM public.sessions s LEFT JOIN public.reviews r ON s.id = r.session_id WHERE r.session_id IS NULL AND s.blob_stream_id IS NOT NULL;