UniSuper's Google Cloud environment was deleted
itnews.com.au36 pointsby siganakis13 comments
(!R)@&{&/x!/:2_!x}'!R
And APL[1]: (~R∊R∘.×R)/R←1↓ιR
Its truly awesome stuff. SELECT
COUNT(*) as columns,
column_type,
table_name
FROM (
SELECT c.id,
c.type AS column_type,
t.name AS table_name
FROM tables t
INNER JOIN columns c
ON t.id = c.table_id
WHERE t.system=false;
) a
HAVING COUNT(*) > 1
ORDER BY columns DESC
Being re-written as: # Use ":=" to replace WITH for named ephermal views
# Replace "WHERE" with "?", "SELECT" with "|>" at the end
non_system := tables
? system=false
|> name:table_name, is:table_id
# Replace INNER JOIN with "*="
non_system_columns := non_system.table_id *= columns.table_id
|> c.id, c.type:column_type
# GROUP BY columns are automatically generated by non-aggregated columns
column_types := non_system_columns
|> COUNT(*):columns DESC, column_type, table_name
So the final query may look like: non_system := tables ? system=false
|> name:table_name, is:table_id
non_system_columns := non_system.table_id *= columns.table_id
|> c.id, c.type:column_type
non_system_columns
|> COUNT(*):columns DESC, column_type, table_name
Any thoughts on this?
https://www.afr.com/companies/financial-services/anz-the-fir...