This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "Log-scaled Histogram. We may improve the support of this. See https://github.com/vega/vega-lite/issues/4792.", | |
"data": { | |
"values": [ | |
{"warehouse": "BigQuery", "year": 2020, "time": 11.18}, | |
{"warehouse": "BigQuery", "year": 2022, "time": 7.35}, | |
{"warehouse": "Snowflake", "year": 2020, "time": 8.21}, | |
{"warehouse": "Snowflake", "year": 2022, "time": 6.61}, | |
{"warehouse": "Databricks", "year": 2020, "time": 18.08}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
state, | |
sum(total_cost), | |
sum(quantity) | |
from orders | |
join order_items using (order_id) | |
join customer using (customer_id) | |
group by 1 | |
select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"data": { | |
"values": [ | |
{"BinLeft": 0.25, "BinRight": 0.5, "Warehouse": "BigQuery", "Count": 0}, | |
{"BinLeft": 0.25, "BinRight": 0.5, "Warehouse": "Snowflake", "Count": 1}, | |
{"BinLeft": 0.25, "BinRight": 0.5, "Warehouse": "Redshift", "Count": 2}, | |
{"BinLeft": 0.25, "BinRight": 0.5, "Warehouse": "Databricks", "Count": 0}, | |
{"BinLeft": 0.25, "BinRight": 0.5, "Warehouse": "Azure", "Count": 0}, | |
{"BinLeft": 0.5, "BinRight": 1, "Warehouse": "BigQuery", "Count": 0}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "Change in benchmark performance", | |
"data": { | |
"values": [ | |
{"warehouse": "BigQuery", "year": 2020, "time": 11.18}, | |
{"warehouse": "BigQuery", "year": 2022, "time": 9.35}, | |
{"warehouse": "Snowflake", "year": 2020, "time": 8.21}, | |
{"warehouse": "Snowflake", "year": 2022, "time": 7.32}, | |
{"warehouse": "Databricks", "year": 2020, "time": 18.08}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- psql -d postgres -f 1.Generate.sql | |
drop table if exists source; | |
create table source as | |
select | |
x, | |
cast(random() as varchar) as a, | |
cast(random() as varchar) as b, | |
cast(random() as varchar) as c, | |
cast(random() as varchar) as d, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table ab_stream (a array<struct<k int, v string>>, b array<struct<k int, v int>>); | |
insert into ab_stream values | |
([(1, "one")], [(2, 200)]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace table lead_transform as | |
select cast(created_date as date) as day, count(1) as leads | |
from lead | |
where date '2016-10-01' < created_date | |
and created_date < date '2016-10-10' | |
group by 1; | |
-- incremental | |
begin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- SOURCE TABLE: visits (time timestamp) partition by date(time); | |
-- DEST TABLE: create table daily (day date, visits int) | |
begin; | |
create temp table new_visits as | |
select date(time), count(1) | |
from visits | |
where time >= date_sub(@prev_date, interval 5 days); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Trace - 5:34:30 PM] Sending request 'textDocument/codeLens - (22)'. | |
Params: { | |
"textDocument": { | |
"uri": "file:///Users/georgefraser/Documents/copy-java-language-server/src/main/java/org/javacs/Classes.java" | |
} | |
} | |
2018-12-23 17:34:30 INFO org.javacs.JavaCompilerService testMethods Finding test methods in Classes.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Ran on n1-standard-8 with 500GB SSD on GCP | |
-- https://console.cloud.google.com/marketplace/details/click-to-deploy-images/mysql?q=mysql&id=59e776b5-96fb-4644-8a6e-92c2756ebef5 | |
-- Create a database `test` and switch to it | |
create database test; | |
use test; | |
-- Create a table `target` and fill it with 100k rows | |
create table target (id varchar(20) primary key, name varchar(2)); |
NewerOlder