<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>sql on Tom Roth</title><link>https://tomroth.dev/tags/sql/</link><description>Recent content in sql on Tom Roth</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 23 Mar 2019 00:00:00 +0000</lastBuildDate><atom:link href="https://tomroth.dev/tags/sql/index.xml" rel="self" type="application/rss+xml"/><item><title>Aginity tip: using code snippets</title><link>https://tomroth.dev/aginity-snippets/</link><pubDate>Sat, 23 Mar 2019 00:00:00 +0000</pubDate><guid>https://tomroth.dev/aginity-snippets/</guid><description>The Aginity code snippets function is a good time-saver. To use code snippets, type in some combination of letters and hit Alt-C. Those letters then expand into a SQL statement.
By default you have
sf (select * from &amp;lt;blank&amp;gt; limit 1000), and sfw (select * from &amp;lt;blank&amp;gt; where &amp;lt;blank&amp;gt; limit = 1000). But you can add your own, which is where they really shine. Use them for things you type again and again.</description></item><item><title>Somehow extracting summary statistics of tables quickly using SQL</title><link>https://tomroth.dev/sql-stats/</link><pubDate>Sat, 26 Jan 2019 00:00:00 +0000</pubDate><guid>https://tomroth.dev/sql-stats/</guid><description>I worked with a large table, with a thousand numeric columns, and some of them were dodgy and I wanted to know which. It would help to find basic summary statistics, like the min, max and mean of each column, so let&amp;rsquo;s do that now.
What to do? Link to heading I really didn&amp;rsquo;t want to do this:
select min(c1), max(c1), mean(c1), min(c2), max(c2), mean(c2), min(c3) -- and so on for 1000 columns from xyz The alternate idea: write SQL, that generates SQL!</description></item></channel></rss>