Skip to content

Instantly share code, notes, and snippets.

@fhoffa
fhoffa / sum.c
Last active February 25, 2020 13:27 — forked from campoy/sum.c
C function called from BigQuery
int sum(int a, int b)
{
return a + b;
}

Hillary Clinton underperformed the (D) senate candidates

state name diff party candidates
California H. Clinton -2338906 Democratic K. Harris,L. Sanchez
New York H. Clinton -644500 Democratic C. Schumer
Missouri H. Clinton -228333 Democratic J. Kander
Kentucky H. Clinton -184388 Democratic J. Gray
Washington H. Clinton -126365 Democratic P. Murray
@fhoffa
fhoffa / correlation between rows.sql
Created September 1, 2014 19:07
correlation between rows
SELECT CORR(a.value, b.value), a.rowid, b.rowid
FROM
(
SELECT column, value, rowid FROM
(
SELECT 'c1' column, c1 AS value, rowid
FROM
(SELECT 1 c1, 2 c2, 3 c3, 'id1' rowid), (SELECT 9 c1, 2 c2, 3 c3, 'id2' rowid), (SELECT 4 c1, 1 c2, 3 c3, 'id3' rowid)
),
(
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"metadata": {
"name": "io sensors correlation plots"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.