id
stringlengths
36
36
document
stringlengths
3
3k
metadata
stringlengths
23
69
embeddings
listlengths
384
384
7035d5e9-c5d7-45b5-a0c2-84abf617e9f7
Users can expect throughput in order of thousands of rows per second. :::note Inserting into single JSON row If inserting into a single JSON column (see the syslog_json schema above), the same insert command can be used. However, users must specify JSONAsObject as the format instead of JSONEachRow e.g. shel...
{"source_file": "migrating-data.md"}
[ 0.06230125203728676, 0.019852997735142708, -0.09784752130508423, 0.03097733110189438, -0.04994623363018036, -0.05123166739940643, -0.034299638122320175, 0.018222585320472717, 0.03286577761173248, 0.08105242997407913, -0.006961462553590536, -0.03576226532459259, 0.048018764704465866, 0.0284...
6761bafc-9331-4812-a8d4-430a619569a8
description: 'Install ClickHouse on MacOS' keywords: ['ClickHouse', 'install', 'Linux', 'tar'] sidebar_label: 'Other Linux' slug: /install/linux_other title: 'Install ClickHouse using tgz archives' hide_title: true doc_type: 'guide' import Tar from './_snippets/_linux_tar_install.md'
{"source_file": "other_linux.md"}
[ -0.020146673545241356, 0.04635027423501015, -0.006083890330046415, -0.07637438923120499, 0.09251473844051361, -0.048644158989191055, 0.012125969864428043, -0.011722918599843979, -0.05268516764044762, -0.04350439831614494, 0.06686703115701675, -0.03448064252734184, 0.001658551744185388, -0....
bcdb4991-986c-402c-82f5-645a1fc8da96
description: 'Install ClickHouse on Debian/Ubuntu Linux' keywords: ['ClickHouse', 'install', 'Debian', 'Ubuntu', 'deb'] sidebar_label: 'Debian/Ubuntu' slug: /install/debian_ubuntu title: 'Install ClickHouse on Debian/Ubuntu' hide_title: true doc_type: 'guide' import DebianProd from './_snippets/_deb_install.md'
{"source_file": "debian_ubuntu.md"}
[ -0.01900630258023739, -0.010271530598402023, 0.04647238925099373, -0.1129513531923294, 0.02193085290491581, -0.07785164564847946, 0.030055461451411247, -0.018362322822213173, -0.08672719448804855, -0.02765071578323841, 0.09031949937343597, -0.04167851805686951, 0.025756772607564926, -0.054...
4041ca4e-ee73-42f8-82ca-9405e18ee4dc
description: 'Install ClickHouse on Windows with WSL' keywords: ['ClickHouse', 'install', 'Redhat', 'rpm'] sidebar_label: 'Windows' slug: /install/windows title: 'Install ClickHouse on Windows with WSL' hide_title: true doc_type: 'guide' import Windows from './_snippets/_windows_install.md'
{"source_file": "windows.md"}
[ 0.01693863235414028, 0.03713786229491234, -0.03266679123044014, 0.03743100166320801, 0.052037522196769714, 0.01845608837902546, 0.039306387305259705, -0.02978450618684292, -0.048864491283893585, -0.04713423550128937, 0.029296524822711945, -0.04342183098196983, 0.025231916457414627, -0.0017...
d1ff8072-606f-40e1-81a6-191c0a99fe0d
description: 'Install ClickHouse on MacOS' keywords: ['ClickHouse', 'install', 'MacOS'] sidebar_label: 'MacOS' slug: /install/macOS title: 'Install ClickHouse using Homebrew' hide_title: true doc_type: 'guide' import MacOSProd from './_snippets/_macos.md'
{"source_file": "macos.md"}
[ -0.006040071602910757, 0.01261296309530735, -0.0034337828401476145, -0.051344260573387146, 0.0846545621752739, -0.03153415024280548, 0.02104872651398182, -0.028976500034332275, -0.08187134563922882, -0.04967592656612396, 0.040181223303079605, -0.04617827758193016, 0.006835620850324631, -0....
03cf37f4-8d49-489b-af01-06979ee4d757
description: 'Install ClickHouse on any platform using curl' keywords: ['ClickHouse', 'install', 'quick', 'curl'] sidebar_label: 'Quick install' slug: /install/quick-install-curl title: 'Install ClickHouse via script using curl' hide_title: true doc_type: 'guide' import QuickInstall from './_snippets/_quick_install...
{"source_file": "quick-install-curl.md"}
[ -0.005015494767576456, 0.029548386111855507, -0.033865753561258316, -0.04095529019832611, 0.011198349297046661, -0.041125018149614334, -0.0084176454693079, -0.03158341720700264, -0.03924994915723801, -0.04493807256221771, 0.07955245673656464, -0.014560617506504059, 0.013945868238806725, -0...
9b72b340-3477-4d0a-a412-537a8bbdb1cb
description: 'Instructions for compiling ClickHouse from source or installing a CI-generated binary' keywords: ['ClickHouse', 'install', 'advanced', 'compile from source', 'CI generated binary'] sidebar_label: 'Advanced install' slug: /install/advanced title: 'Advanced installation methods' hide_title: false doc_type: ...
{"source_file": "advanced.md"}
[ -0.007526542525738478, -0.00715529965236783, -0.041624683886766434, -0.06276901811361313, -0.048362452536821365, -0.06388356536626816, -0.01303535234183073, -0.019282346591353416, -0.10664723068475723, -0.01337047666311264, 0.043427664786577225, -0.09307167679071426, 0.013225427828729153, ...
b3d67d90-a986-4de6-84cf-5346cca7b490
description: 'Install ClickHouse on Redhat/CentOS Linux' keywords: ['ClickHouse', 'install', 'Redhat', 'CentOS', 'rpm'] sidebar_label: 'Redhat/CentOS' slug: /install/redhat title: 'Install ClickHouse on rpm-based Linux distributions' hide_title: true doc_type: 'guide' import RPM from './_snippets/_rpm_install.md'
{"source_file": "redhat.md"}
[ 0.02381940558552742, -0.03642869368195534, -0.038943640887737274, -0.06362326443195343, 0.10166700184345245, -0.00639997748658061, 0.02195730246603489, -0.020738905295729637, -0.08580290526151657, -0.06501084566116333, 0.09055262058973312, -0.04088499769568443, 0.02923877164721489, -0.0384...
482c1abe-830e-474f-93be-35f3e450568f
description: 'Install ClickHouse on Debian/Ubuntu Linux' keywords: ['ClickHouse', 'install', 'Docker'] sidebar_label: 'Docker' slug: /install/docker title: 'Install ClickHouse using Docker' hide_title: true doc_type: 'guide' import Docker from './_snippets/_docker.md'
{"source_file": "docker.md"}
[ -0.024867724627256393, 0.020768141373991966, 0.02650061435997486, -0.05048568546772003, 0.0327327623963356, -0.06226544454693794, 0.017818277701735497, -0.01937069557607174, -0.06846145540475845, -0.018596794456243515, 0.028350768610835075, -0.0657268688082695, 0.02186739258468151, -0.0148...
a38aa550-7606-4367-92fb-a38db474c71f
description: 'Data for billions of taxi and for-hire vehicle (Uber, Lyft, etc.) trips originating in New York City since 2009' sidebar_label: 'New York taxi data' slug: /getting-started/example-datasets/nyc-taxi title: 'New York Taxi Data' doc_type: 'guide' keywords: ['example dataset', 'nyc taxi', 'tutorial', 'sampl...
{"source_file": "nyc-taxi.md"}
[ 0.05633191019296646, -0.07493388652801514, -0.022866833955049515, 0.03902093693614006, 0.010442706756293774, -0.0017693097470328212, 0.023979580029845238, -0.044764064252376556, -0.07944702357053757, 0.017879730090498924, 0.04765462502837181, 0.009462646208703518, 0.006956998258829117, -0....
b66f7fed-fb63-437b-a79c-69f76209ce54
The following command streams three files from a GCS bucket into the trips table (the {0..2} syntax is a wildcard for the values 0, 1, and 2): sql INSERT INTO nyc_taxi.trips_small SELECT trip_id, pickup_datetime, dropoff_datetime, pickup_longitude, pickup_latitude, dropoff_longitude, d...
{"source_file": "nyc-taxi.md"}
[ -0.01068434864282608, -0.03921125829219818, -0.030113032087683678, 0.05727050080895424, -0.03189292550086975, -0.08621267974376678, 0.08296684175729752, -0.020349737256765366, -0.03600982576608658, 0.033502254635095596, 0.02042418345808983, -0.0657355859875679, 0.042454853653907776, -0.101...
7ae2b5a2-da99-4e09-bca7-25c0dba12622
See https://github.com/toddwschneider/nyc-taxi-data and http://tech.marksblogg.com/billion-nyc-taxi-rides-redshift.html for the description of a dataset and instructions for downloading. Downloading will result in about 227 GB of uncompressed data in CSV files. The download takes about an hour over a 1 Gbit connectio...
{"source_file": "nyc-taxi.md"}
[ 0.039862971752882004, -0.016991566866636276, -0.04868562892079353, -0.002722004661336541, 0.05194157361984253, -0.06414318829774857, -0.031098369508981705, -0.03259927034378052, -0.01040783803910017, 0.054248448461294174, 0.010856231674551964, 0.018060505390167236, -0.05937509983778, -0.07...
f6db9a69-a8ad-41d4-8c48-0ec587a679a0
sql
{"source_file": "nyc-taxi.md"}
[ 0.07582295686006546, 0.0011653322726488113, -0.03202968090772629, 0.07204441726207733, -0.10746068507432938, 0.006198782008141279, 0.1837887018918991, 0.028402604162693024, -0.0444914735853672, -0.0017817936604842544, 0.0661090537905693, -0.0014285664074122906, 0.08542580902576447, -0.0624...
f8263a1c-abdf-4508-96d1-2a139fd62af4
CREATE TABLE default.trips_mergetree_third ( trip_id UInt32, vendor_id Enum8('1' = 1, '2' = 2, 'CMT' = 3, 'VTS' = 4, 'DDS' = 5, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14), pickup_date Date, pickup_datetime DateTime, dropoff_date Date, dropoff_datetime DateTime, store_and_fwd_flag U...
{"source_file": "nyc-taxi.md"}
[ 0.06548941880464554, 0.01729363016784191, -0.042913537472486496, 0.012406527996063232, -0.04907248169183731, -0.00710943853482604, 0.019786041229963303, 0.040224045515060425, -0.05135050788521767, 0.06265398859977722, 0.11194583028554916, -0.10370253771543503, 0.008179716765880585, -0.0736...
47056717-0eb3-4077-967b-ae0363f10195
= 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, ...
{"source_file": "nyc-taxi.md"}
[ 0.10098664462566376, -0.08191058039665222, 0.0557032972574234, 0.01831633411347866, 0.030155044049024582, 0.06574583798646927, -0.07042296975851059, -0.08633781224489212, -0.09561042487621307, 0.006724240258336067, -0.04015296325087547, -0.08685784786939621, -0.0169826690107584, 0.02532734...
98f40b26-2395-4ffb-b57f-7dcaf390e054
= 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park ...
{"source_file": "nyc-taxi.md"}
[ 0.0700279250741005, -0.033156026154756546, 0.005018690600991249, 0.0006638895720243454, -0.025925040245056152, 0.05445704981684685, -0.07839107513427734, -0.0527678057551384, -0.12784430384635925, -0.012537558563053608, 0.013590402901172638, -0.06618671119213104, -0.0015444309683516622, -0...
b26c7667-b441-45ae-9b7b-541aeb646ae6
= 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, ...
{"source_file": "nyc-taxi.md"}
[ 0.11493565887212753, -0.07842840254306793, 0.050981730222702026, 0.013232262805104256, 0.0200498066842556, 0.03812645375728607, -0.07626472413539886, -0.12669028341770172, -0.07874232530593872, 0.00215164409019053, 0.008828346617519855, -0.044393692165613174, -0.030251648277044296, -0.0186...
9d772dd7-bf94-4038-b56d-33db791c336a
'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner...
{"source_file": "nyc-taxi.md"}
[ 0.0680123046040535, -0.08119821548461914, 0.0021842061541974545, -0.005765696056187153, -0.020191390067338943, 0.04930558800697327, -0.0388503298163414, -0.09240609407424927, -0.14405877888202667, -0.011921319179236889, 0.033292319625616074, -0.053255654871463776, 0.01779966987669468, -0.0...
4f62aefe-a815-48b0-ae37-043dd72b7fee
On the source server: sql CREATE TABLE trips_mergetree_x3 AS trips_mergetree_third ENGINE = Distributed(perftest, default, trips_mergetree_third, rand()); The following query redistributes data: sql INSERT INTO trips_mergetree_x3 SELECT * FROM trips_mergetree; This takes 2454 seconds. On three servers: Q1: ...
{"source_file": "nyc-taxi.md"}
[ 0.06506422907114029, -0.055861037224531174, 0.009848363697528839, 0.0803535059094429, -0.005368295591324568, -0.14412377774715424, -0.013303481973707676, -0.02458902820944786, 0.06922445446252823, 0.01177428662776947, 0.007631328888237476, -0.04397941008210182, -0.0027194705326110125, -0.0...
68cce6f7-fdc6-4f70-afcc-efeb4a56ba82
description: 'A terabyte of click logs from Criteo' sidebar_label: 'Criteo 1TB click logs' slug: /getting-started/example-datasets/criteo keywords: ['Criteo click logs', 'advertising data', 'click-through data', 'terabyte dataset', 'getting started'] title: 'Terabyte click logs from Criteo' doc_type: 'guide' Downlo...
{"source_file": "criteo.md"}
[ 0.029170364141464233, -0.06263914704322815, -0.04117220640182495, 0.033519353717565536, 0.012094319798052311, -0.036302998661994934, 0.09796145558357239, 0.036503538489341736, -0.10262369364500046, 0.046782899647951126, 0.03856237232685089, -0.07828966528177261, 0.03432919830083847, -0.053...
af589b58-2376-4dd9-aa5f-13453d229ad9
Transform data from the raw log and put it in the second table: ```sql INSERT INTO criteo SELECT date, clicked, int1, int2, int3, int4, int5, int6, int7, int8, int9, int10, int11, int12, int13, reinterpretAsUInt32(unhex(cat1)) AS icat1, reinterpr...
{"source_file": "criteo.md"}
[ 0.051757391542196274, -0.06089457497000694, 0.03293812274932861, 0.008872264996170998, -0.07140976935625076, 0.016668641939759254, -0.0045790839940309525, -0.010588402859866619, -0.0899113118648529, 0.04415009170770645, 0.02046854980289936, -0.08996149897575378, 0.0337197482585907, -0.0626...
28ad61c2-04d7-4014-8e42-8add700a8bed
description: 'Explore the WikiStat dataset containing 0.5 trillion records.' sidebar_label: 'WikiStat' slug: /getting-started/example-datasets/wikistat title: 'WikiStat' doc_type: 'guide' keywords: ['example dataset', 'wikipedia', 'tutorial', 'sample data', 'pageviews'] The dataset contains 0.5 trillion records. ...
{"source_file": "wikistat.md"}
[ -0.033918969333171844, 0.03143541142344475, -0.028887702152132988, 0.036859605461359024, 0.03582900017499924, -0.1029479131102562, -0.0066758315078914165, -0.006223773583769798, 0.013377880677580833, 0.04450315237045288, 0.10612426698207855, -0.00023574924853164703, 0.08290843665599823, -0...
d9bc2603-6937-4f54-bcd6-be0fa70cba30
description: 'The TPC-DS benchmark data set and queries.' sidebar_label: 'TPC-DS' slug: /getting-started/example-datasets/tpcds title: 'TPC-DS (2012)' doc_type: 'guide' keywords: ['example dataset', 'tpcds', 'benchmark', 'sample data', 'performance testing'] Similar to the Star Schema Benchmark (SSB) , TPC-DS is b...
{"source_file": "tpcds.md"}
[ -0.029449719935655594, 0.008485103026032448, -0.026408039033412933, 0.05433010309934616, -0.03974904492497444, -0.09707925468683243, -0.022946661338210106, 0.08575315773487091, -0.01202641986310482, -0.034879159182310104, -0.040606312453746796, -0.013510649092495441, 0.014713018201291561, ...
4ce39f32-9677-488a-84e0-0b9a6722b2bd
```sql CREATE TABLE call_center( cc_call_center_sk Int64, cc_call_center_id LowCardinality(String), cc_rec_start_date Nullable(Date), cc_rec_end_date Nullable(Date), cc_closed_date_sk Nullable(UInt32), cc_open_date_sk Nullable(UInt3...
{"source_file": "tpcds.md"}
[ 0.02515074610710144, 0.0166876632720232, -0.07735484093427658, 0.06499585509300232, -0.09705144166946411, -0.005343285389244556, 0.06110534071922302, 0.0545349158346653, -0.043871887028217316, -0.011284533888101578, 0.08839616179466248, -0.11193125694990158, -0.015174041502177715, -0.04584...
d7c56477-d4a3-440a-92c5-d79dae860a05
CREATE TABLE catalog_returns( cr_returned_date_sk Int32, cr_returned_time_sk Int64, cr_item_sk Int64, cr_refunded_customer_sk Nullable(Int64), cr_refunded_cdemo_sk Nullable(Int64), cr_refunded_hdemo_sk Nullable(Int64), cr_refunded_addr_sk Nullable...
{"source_file": "tpcds.md"}
[ 0.022197969257831573, -0.013586128130555153, -0.07617095857858658, 0.03864339739084244, -0.03239325433969498, 0.04583209753036499, -0.031347017735242844, 0.05148952454328537, -0.07005679607391357, 0.06083877757191658, 0.13140474259853363, -0.13903513550758362, 0.026573805138468742, -0.0708...
1c7cabf8-9342-4339-95ac-7a4e3cb941a5
CREATE TABLE catalog_sales ( cs_sold_date_sk Nullable(UInt32), cs_sold_time_sk Nullable(Int64), cs_ship_date_sk Nullable(UInt32), cs_bill_customer_sk Nullable(Int64), cs_bill_cdemo_sk Nullable(Int64), cs_bill_hdemo_sk Nullable(Int64), cs_...
{"source_file": "tpcds.md"}
[ 0.02553153596818447, 0.005854299757629633, -0.10531798005104065, 0.03215508162975311, -0.07714344561100006, 0.060594018548727036, -0.028765125200152397, 0.04650965705513954, -0.06647740304470062, 0.05483521893620491, 0.12073281407356262, -0.13880102336406708, 0.05142618715763092, -0.086018...
164febb0-26ec-4d82-9734-849806291c9c
CREATE TABLE customer_demographics ( cd_demo_sk Int64, cd_gender LowCardinality(String), cd_marital_status LowCardinality(String), cd_education_status LowCardinality(String), cd_purchase_estimate Int32, cd_credit_rating LowCardinality(St...
{"source_file": "tpcds.md"}
[ 0.05969854071736336, 0.05379343032836914, -0.044157709926366806, 0.04138045012950897, -0.08707087486982346, 0.07309743016958237, 0.017139002680778503, 0.09338018298149109, -0.03814571723341942, 0.01686142571270466, 0.17908623814582825, -0.17007648944854736, 0.04553315415978432, -0.09349133...
9c38650c-181c-4b5c-8fae-0af07d11cc17
CREATE TABLE household_demographics ( hd_demo_sk Int64, hd_income_band_sk Int64, hd_buy_potential LowCardinality(String), hd_dep_count Int32, hd_vehicle_count Int32, PRIMARY KEY (hd_demo_sk) ); CREATE TABLE income_band( ib_income_band_s...
{"source_file": "tpcds.md"}
[ 0.09212084114551544, 0.0379926897585392, -0.031123755499720573, 0.030692672356963158, -0.08573533594608307, 0.0553719624876976, -0.007460231427103281, 0.11556641012430191, -0.07125622779130936, 0.013664673082530499, 0.13081784546375275, -0.15724746882915497, 0.05839924141764641, -0.0789294...
47b429c5-fe69-4557-9eb7-255ed4aff1bc
CREATE TABLE promotion ( p_promo_sk Int64, p_promo_id LowCardinality(String), p_start_date_sk Nullable(UInt32), p_end_date_sk Nullable(UInt32), p_item_sk Nullable(Int64), p_cost Nullable(Decimal(15,2)), p_...
{"source_file": "tpcds.md"}
[ 0.0662822425365448, 0.00863656960427761, -0.07770358771085739, 0.016022631898522377, -0.025090133771300316, 0.053283631801605225, 0.05856476351618767, 0.058779701590538025, -0.0032294720876961946, 0.01563890092074871, 0.09264440089464188, -0.14779426157474518, 0.03467420116066933, -0.02407...
f737da89-4f74-454c-85af-8f44d2ee3201
CREATE TABLE store_sales ( ss_sold_date_sk Nullable(UInt32), ss_sold_time_sk Nullable(Int64), ss_item_sk Int64, ss_customer_sk Nullable(Int64), ss_cdemo_sk Nullable(Int64), ss_hdemo_sk Nullable(Int64), ss_addr_sk ...
{"source_file": "tpcds.md"}
[ 0.015124657191336155, 0.01933007873594761, -0.12230294942855835, 0.023427071049809456, -0.06261537969112396, 0.08643060177564621, -0.0018111236859112978, 0.09477408975362778, -0.043197885155677795, 0.053842511028051376, 0.12727764248847961, -0.13677214086055756, 0.05799892172217369, -0.011...
11cb3f3c-af6c-44d6-8f9c-ed44612e335e
CREATE TABLE time_dim ( t_time_sk UInt32, t_time_id LowCardinality(String), t_time UInt32, t_hour UInt8, t_minute UInt8, t_second UInt8, t_am_pm LowCardinality(String), ...
{"source_file": "tpcds.md"}
[ 0.08803053200244904, 0.03991769626736641, -0.02444089576601982, 0.039559733122587204, -0.07792540639638901, 0.01712733320891857, 0.019299758598208427, 0.026462944224476814, 0.0020201613660901785, -0.04121548682451248, 0.13206234574317932, -0.12232591211795807, 0.01081222016364336, -0.05308...
e660ae79-ebd3-4706-be14-6546c1de289d
CREATE TABLE web_returns ( wr_returned_date_sk Nullable(UInt32), wr_returned_time_sk Nullable(Int64), wr_item_sk Int64, wr_refunded_customer_sk Nullable(Int64), wr_refunded_cdemo_sk Nullable(Int64), wr_refunded_hdemo_sk Nullable(Int64), wr_refunded_addr...
{"source_file": "tpcds.md"}
[ -0.00736127607524395, 0.0025878059677779675, -0.08994951844215393, 0.03801369294524193, -0.016496505588293076, 0.054244861006736755, -0.011030683293938637, 0.027840636670589447, -0.0743492841720581, 0.0684170052409172, 0.11089499294757843, -0.11319440603256226, 0.027510451152920723, -0.073...
9b182921-e898-4cf2-8d54-ddacf1dd3701
CREATE TABLE web_site ( web_site_sk Int64, web_site_id LowCardinality(String), web_rec_start_date LowCardinality(String), web_rec_end_date LowCardinality(Nullable(String)), web_name LowCardinality(String), web_open_date_sk UInt32, web_close_date_...
{"source_file": "tpcds.md"}
[ 0.06928835064172745, 0.012366079725325108, -0.06643004715442657, 0.00916255172342062, -0.056588057428598404, -0.001325874007306993, 0.06898007541894913, 0.0037090061232447624, -0.10718221217393875, -0.025110630318522453, 0.1152997761964798, -0.1374000906944275, 0.011756771244108677, -0.110...
70820963-e970-4077-b457-ca5d04f994c4
The data can be imported as follows: bash clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO call_center FORMAT CSV" < call_center.tbl clickhouse-client --format_csv_delimiter '|' --query "INSERT INTO catalog_page FORMAT CSV" < catalog_page.tbl clickhouse-client --format_csv_delimiter '|' --query "INSE...
{"source_file": "tpcds.md"}
[ 0.02621936984360218, -0.04525356739759445, -0.06037649139761925, 0.03980831429362297, -0.09100665897130966, 0.05544522404670715, -0.023116979748010635, -0.0018830442568287253, -0.05643893778324127, -0.011779194697737694, 0.014903522096574306, -0.06535282731056213, 0.07981684058904648, -0.1...
ecb0e9ad-cd79-4448-8a92-f7fc0f0cc7d3
description: 'COVID-19 Open-Data is a large, open-source database of COVID-19 epidemiological data and related factors like demographics, economics, and government responses' sidebar_label: 'COVID-19 open-data' slug: /getting-started/example-datasets/covid19 title: 'COVID-19 Open-Data' keywords: ['COVID-19 data', 'ep...
{"source_file": "covid19.md"}
[ 0.01971649006009102, -0.03643934428691864, -0.07128757238388062, 0.019795790314674377, 0.06318281590938568, -0.0005378350615501404, -0.03259284794330597, 0.05327229201793671, -0.08541884273290634, 0.017887191846966743, 0.08486024290323257, -0.026468336582183838, -0.008671306073665619, -0.0...
37c0f5a1-a685-4aa9-af32-d186ad09bd65
sql SELECT * FROM url('https://storage.googleapis.com/covid19-open-data/v3/epidemiology.csv') LIMIT 100; Notice the url function easily reads data from a CSV file: response β”Œβ”€c1─────────┬─c2───────────┬─c3────────────┬─c4───────────┬─c5────────────┬─c6─────────┬─c7───────────────────┬─c8──────────────────┬─c9────...
{"source_file": "covid19.md"}
[ -0.010755576193332672, 0.03843924030661583, -0.06047261133790016, 0.018726631999015808, 0.022787882015109062, -0.07493586093187332, -0.012678918428719044, -0.0013983258977532387, -0.004315354395657778, 0.07863672077655792, 0.0788327306509018, -0.08720587193965912, 0.05993896350264549, -0.0...
74b3e92a-f5f5-4452-b246-344b273cd9ee
It goes pretty quick - let's see how many rows were inserted: sql SELECT formatReadableQuantity(count()) FROM covid19; response β”Œβ”€formatReadableQuantity(count())─┐ β”‚ 12.53 million β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Let's see how many total cases of Covid-19 were recorded: sql SELECT f...
{"source_file": "covid19.md"}
[ 0.02025560475885868, -0.03333744406700134, 0.0018175144214183092, 0.03653842955827713, -0.017023760825395584, -0.026878945529460907, 0.020757226273417473, 0.04529889300465584, -0.02698994241654873, 0.06871858984231949, 0.040301863104104996, -0.056244995445013046, 0.02479449100792408, 0.011...
8eaf4d3a-316f-4ba9-9617-27fc541f320d
The response look like: response β”Œβ”€confirmed_cases_delta─┬─new_confirmed─┬─location_key─┬───────date─┐ β”‚ 0 β”‚ 0 β”‚ US_DC β”‚ 2020-03-08 β”‚ β”‚ 2 β”‚ 2 β”‚ US_DC β”‚ 2020-03-09 β”‚ β”‚ -2 β”‚ 0 β”‚ US_DC β”‚ 2020-03-10 β”‚ β”‚ ...
{"source_file": "covid19.md"}
[ -0.055711328983306885, 0.04229430481791496, -0.015283778309822083, 0.010282293893396854, 0.01076002512127161, -0.06890509277582169, -0.006909415125846863, -0.029786821454763412, -0.03120068646967411, 0.08876930177211761, 0.0771314799785614, -0.0032951487228274345, 0.07219962775707245, -0.0...
f0c4c871-ce00-46d4-b283-65bcad168341
The results look like response β”Œβ”€β”€β”€β”€β”€β”€β”€date─┬─new_confirmed─┬─percent_change─┬─trend─────┐ β”‚ 2020-03-08 β”‚ 0 β”‚ nan β”‚ decrease β”‚ β”‚ 2020-03-09 β”‚ 2 β”‚ inf β”‚ increase β”‚ β”‚ 2020-03-10 β”‚ 0 β”‚ -100 β”‚ decrease β”‚ β”‚ 2020-03-11 β”‚ 6 β”‚ inf β”‚...
{"source_file": "covid19.md"}
[ -0.05809435620903969, 0.003600717056542635, 0.0019577748607844114, 0.006637689657509327, -0.011940416879951954, -0.10229170322418213, -0.02704908326268196, -0.008524884469807148, 0.0009120781323872507, 0.08143606781959534, 0.05068393424153328, -0.0026772269047796726, 0.0654115229845047, -0...
bae42e7e-66ce-4b71-8a37-0325efc8d65e
description: '2.5 billion rows of climate data for the last 120 yrs' sidebar_label: 'NOAA Global Historical Climatology Network ' slug: /getting-started/example-datasets/noaa title: 'NOAA Global Historical Climatology Network' doc_type: 'guide' keywords: ['example dataset', 'noaa', 'weather data', 'sample data', 'clima...
{"source_file": "noaa.md"}
[ -0.08328356593847275, 0.0012433993397280574, 0.06681420654058456, 0.03938550502061844, -0.02130606770515442, -0.0704401507973671, -0.014418038539588451, -0.004242143593728542, 0.0011793560115620494, -0.03289181739091873, -0.00037112028803676367, -0.07059912383556366, -0.0013315231772139668, ...
60e2636f-3a78-4dd0-bdb1-7b9e2db6b9b6
To download: bash wget https://datasets-documentation.s3.eu-west-3.amazonaws.com/noaa/noaa_enriched.parquet Original data {#original-data} The following details the steps to download and transform the original data in preparation for loading into ClickHouse. Download {#download} To download the original data:...
{"source_file": "noaa.md"}
[ -0.04403778538107872, 0.015503717586398125, -0.10713561624288559, -0.015615974552929401, 0.03215055167675018, -0.06595446914434433, -0.01640271581709385, -0.055779486894607544, 0.03409207612276077, 0.06791753321886063, 0.019022347405552864, -0.06397020071744919, -0.00832627434283495, -0.13...
675a9cfb-2149-435c-b0f1-9d862e468c19
S-FLAG is the source flag for the observation. Not useful for our analysis and ignored. OBS-TIME = 4-character time of observation in hour-minute format (i.e. 0700 =7:00 am). Typically not present in older data. We ignore this for our purposes. A measurement per line would result in a sparse table structure in Cl...
{"source_file": "noaa.md"}
[ 0.0047805169597268105, 0.04668380320072174, -0.032578811049461365, 0.07319772243499756, -0.04571365937590599, -0.016810309141874313, 0.1113005131483078, -0.03244653344154358, 0.006283771712332964, 0.009181439876556396, -0.06753812730312347, -0.08333419263362885, 0.01831532083451748, -0.014...
a3fdc101-a941-4a99-bfa6-38a3c2989628
Using ClickHouse local and a simple GROUP BY , we can repivot our data to this structure. To limit memory overhead, we do this one file at a time. bash for i in {1900..2022} do clickhouse-local --query "SELECT station_id, toDate32(date) as date, anyIf(value, measurement = 'TAVG') as tempAvg, any...
{"source_file": "noaa.md"}
[ 0.03217316046357155, 0.01590733602643013, 0.008515628054738045, 0.059613704681396484, 0.011381878517568111, -0.009726917371153831, 0.05566520616412163, 0.021402200683951378, -0.04318050295114517, 0.01355182845145464, 0.004328252747654915, -0.07091076672077179, 0.040088094770908356, -0.0807...
66b47603-61b4-426e-a43d-ed56fba40a68
This query takes a few minutes to run and produces a 6.4 GB file, noaa_enriched.parquet . Create table {#create-table} Create a MergeTree table in ClickHouse (from the ClickHouse client). ``sql CREATE TABLE noaa ( station_id LowCardinality(String), date Date32, tempAvg Int32 COMMENT 'Average temperature (tenths ...
{"source_file": "noaa.md"}
[ 0.017729422077536583, 0.01619395613670349, 0.001594536006450653, 0.06646668910980225, -0.03209659084677696, -0.058619726449251175, 0.040637608617544174, 0.020813632756471634, -0.0293057169765234, 0.08857988566160202, 0.030057992786169052, -0.1455446183681488, 0.036049775779247284, -0.07848...
387f1253-4236-4844-9b80-22727b7cbb8a
5 rows in set. Elapsed: 0.514 sec. Processed 1.06 billion rows, 4.27 GB (2.06 billion rows/s., 8.29 GB/s.) ``` Reassuringly consistent with the documented record at Furnace Creek as of 2023. Best ski resorts {#best-ski-resorts} Using a list of ski resorts in the united states and their respective locations,...
{"source_file": "noaa.md"}
[ 0.05303359776735306, -0.04940455034375191, 0.02796250395476818, 0.09554096311330795, -0.0005462213885039091, -0.04200604185461998, 0.044298991560935974, -0.004124426282942295, -0.07309896498918533, 0.06281287223100662, -0.055550068616867065, 0.008131429553031921, 0.06880722939968109, 0.041...
f3594236-ced4-43ac-9cf6-8d832784221d
Credits {#credits} We would like to acknowledge the efforts of the Global Historical Climatology Network for preparing, cleansing, and distributing this data. We appreciate your efforts. Menne, M.J., I. Durre, B. Korzeniewski, S. McNeal, K. Thomas, X. Yin, S. Anthony, R. Ray, R.S. Vose, B.E.Gleason, and T.G. Housto...
{"source_file": "noaa.md"}
[ 0.005077620502561331, 0.05795121565461159, 0.10008002817630768, 0.008622300811111927, 0.059473246335983276, -0.05737235024571419, -0.060591116547584534, -0.022816916927695274, -0.030951833352446556, 0.038136132061481476, 0.012263927608728409, -0.08518066257238388, -0.00825481116771698, 0.0...
ba76107f-0eeb-46c5-8b84-61d2dee5ef7a
description: 'Dataset containing all events on GitHub from 2011 to Dec 6 2020, with a size of 3.1 billion records.' sidebar_label: 'GitHub events' slug: /getting-started/example-datasets/github-events title: 'GitHub Events Dataset' doc_type: 'guide' keywords: ['GitHub events', 'version control data', 'developer activ...
{"source_file": "github-events.md"}
[ 0.011171426624059677, -0.0488242469727993, -0.03809737786650658, 0.03190697357058525, 0.039719391614198685, -0.0266745425760746, -0.05689448118209839, 0.01953049562871456, 0.006029770243912935, 0.07490333914756775, 0.04597404971718788, 0.037816308438777924, -0.0018737957580015063, -0.07991...
9ef23afc-1aab-49ec-917c-0b4bee95b8b5
description: 'Over 150M customer reviews of Amazon products' sidebar_label: 'Amazon customer reviews' slug: /getting-started/example-datasets/amazon-reviews title: 'Amazon Customer Review' doc_type: 'guide' keywords: ['Amazon reviews', 'customer reviews dataset', 'e-commerce data', 'example dataset', 'getting started']...
{"source_file": "amazon-reviews.md"}
[ -0.048394810408353806, -0.04218409210443497, -0.08767180889844894, 0.025050293654203415, 0.023091593757271767, -0.03881875425577164, 0.010919407941401005, -0.04850250482559204, 0.012864463962614536, 0.023128917440772057, 0.0948445200920105, 0.00016383141337428242, 0.06896598637104034, -0.1...
2ab11754-28db-45cc-94bd-cf07b044b528
Row 3: ────── review_date: 16462 marketplace: US customer_id: 24803564 -- 24.80 million review_id: R7K9U5OEIRJWR product_id: B00LB8C4U4 product_parent: 524588109 -- 524.59 million product_title: iPhone 5s Case, BUDDIBOX [Shield] Slim Dual Layer Protective Case with Kickstand for ...
{"source_file": "amazon-reviews.md"}
[ -0.020783837884664536, 0.04075075313448906, 0.012588267214596272, -0.00023332446289714426, 0.030665719881653786, 0.004950067959725857, 0.03282249718904495, 0.036176614463329315, -0.030007079243659973, 0.055441081523895264, 0.08497092872858047, -0.021838052198290825, 0.08158912509679794, -0...
d530f6b8-f148-4f96-ac0a-2f0d8059f06f
The original data was about 70G, but compressed in ClickHouse it takes up about 30G. Example queries {#example-queries} Let's run some queries. Here are the top 10 most-helpful reviews in the dataset: sql runnable SELECT product_title, review_headline FROM amazon.amazon_reviews ORDER BY helpful_votes ...
{"source_file": "amazon-reviews.md"}
[ -0.004448557738214731, -0.07029175758361816, -0.10430313646793365, 0.08524695038795471, 0.0013569227885454893, 0.025045214220881462, -0.0008529279148206115, -0.010438543744385242, 0.0065058451145887375, 0.028333870694041252, -0.003789351088926196, -0.005874055437743664, 0.06325902044773102, ...
56f97400-7952-4506-b4d5-487f2b810b36
description: 'A new analytical benchmark for machine-generated log data' sidebar_label: 'Brown university benchmark' slug: /getting-started/example-datasets/brown-benchmark title: 'Brown University Benchmark' keywords: ['Brown University Benchmark', 'MgBench', 'log data benchmark', 'machine-generated data', 'getting st...
{"source_file": "brown-benchmark.md"}
[ -0.008299112319946289, -0.0037010773085057735, -0.059957653284072876, 0.054131604731082916, 0.007605767343193293, -0.1420244723558426, 0.056194450706243515, 0.02390161342918873, -0.08321013301610947, 0.04285008832812309, 0.008028979413211346, -0.06640048325061798, 0.08463964611291885, -0.0...
1f3fbeba-6c76-44a6-830b-914c0a513318
Run benchmark queries {#run-benchmark-queries} sql USE mgbench; ```sql -- Q1.1: What is the CPU/network utilization for each web server since midnight? SELECT machine_name, MIN(cpu) AS cpu_min, MAX(cpu) AS cpu_max, AVG(cpu) AS cpu_avg, MIN(net_in) AS net_in_min, MAX(net_in) AS n...
{"source_file": "brown-benchmark.md"}
[ 0.0772862508893013, -0.0014233340043574572, 0.0018329720478504896, 0.07383868098258972, -0.0597238652408123, -0.13014139235019684, 0.07444193959236145, -0.009500009939074516, -0.10913528501987457, 0.04885849729180336, -0.051339492201805115, -0.0898352637887001, 0.026665057986974716, -0.059...
46c8ff7b-38f3-4cde-a0c8-e66609ba05fd
```sql -- Q1.6: What is the total hourly network traffic across all file servers? SELECT dt, hr, SUM(net_in) AS net_in_sum, SUM(net_out) AS net_out_sum, SUM(net_in) + SUM(net_out) AS both_sum FROM ( SELECT CAST(log_time AS DATE) AS dt, EXTRACT(HOUR FROM log_time) AS hr, ...
{"source_file": "brown-benchmark.md"}
[ 0.026913082227110863, 0.019597068428993225, 0.02417590469121933, 0.07038236409425735, -0.04633261635899544, -0.09084104746580124, 0.12198829650878906, 0.012167800217866898, 0.016103694215416908, 0.08427157998085022, -0.04745098203420639, -0.00949123315513134, 0.03495379537343979, -0.054518...
99cda51d-d2c9-4ead-b20a-16cca53dc07d
```sql -- Q3.1: Did the indoor temperature reach freezing over the weekend? SELECT * FROM logs3 WHERE event_type = 'temperature' AND event_value <= 32.0 AND log_time >= '2019-11-29 17:00:00.000'; ``` ```sql -- Q3.4: Over the past 6 months, how frequently were each door opened? SELECT device_name, devic...
{"source_file": "brown-benchmark.md"}
[ 0.07116882503032684, -0.024007104337215424, 0.13192525506019592, 0.10032562166452408, 0.00393138499930501, -0.08539526909589767, 0.033813346177339554, -0.032283715903759, 0.0060315984301269054, 0.05225304141640663, 0.0324062779545784, -0.04798215627670288, 0.057688698172569275, -0.01752236...
d20851af-3ca1-4ed2-a580-ab77a259f017
```sql -- Q3.6: For each device category, what are the monthly power consumption metrics? SELECT yr, mo, SUM(coffee_hourly_avg) AS coffee_monthly_sum, AVG(coffee_hourly_avg) AS coffee_monthly_avg, SUM(printer_hourly_avg) AS printer_monthly_sum, AVG(printer_hourly_avg) AS printer_mon...
{"source_file": "brown-benchmark.md"}
[ 0.026855500414967537, -0.010945789515972137, -0.011644750833511353, 0.09190869331359863, -0.03574558347463608, -0.08289077132940292, 0.030927708372473717, -0.036076270043849945, 0.029814334586262703, 0.00028681830735877156, -0.000592433731071651, -0.08864787966012955, 0.040385130792856216, ...
9ecdc315-83b4-489a-b8b2-e0c6cbd3a051
description: 'Dataset containing all of the commits and changes for the ClickHouse repository' sidebar_label: 'Github repo' slug: /getting-started/example-datasets/github title: 'Writing Queries in ClickHouse using GitHub Data' keywords: ['Github'] show_related_blogs: true doc_type: 'guide' import Image from '@th...
{"source_file": "github.md"}
[ -0.022569265216588974, -0.0408354327082634, -0.040035784244537354, 0.0556245781481266, 0.05675210431218147, -0.025337422266602516, -0.0006817228859290481, 0.008949055336415768, -0.062178824096918106, 0.05131852626800537, 0.06901570409536362, 0.015291954390704632, 0.054780375212430954, -0.0...
27af14e0-4211-4d56-a4ba-44869f5ef7e7
Linux - ~/clickhouse git-import - 160 mins Downloading and inserting the data {#downloading-and-inserting-the-data} The following data can be used to reproduce a working environment. Alternatively, this dataset is available in play.clickhouse.com - see Queries for further details. Generated files for the fo...
{"source_file": "github.md"}
[ -0.04281031712889671, -0.06477479636669159, -0.08469875901937485, -0.002394146053120494, 0.05635525658726692, -0.06748238205909729, -0.11177371442317963, -0.020645247772336006, -0.032361697405576706, 0.08439113199710846, 0.058510445058345795, -0.02383624203503132, -0.0290532186627388, -0.0...
e91c352a-ef42-403f-a4a5-0f3f6d361b5c
prev_commit_hash String, prev_author LowCardinality(String), prev_time DateTime, file_change_type Enum('Add' = 1, 'Delete' = 2, 'Modify' = 3, 'Rename' = 4, 'Copy' = 5, 'Type' = 6), path LowCardinality(String), old_path LowCardinality(String), file_extension LowCardinality(String), file_lines_added UInt32, file_lines_d...
{"source_file": "github.md"}
[ 0.02706041932106018, 0.04629974067211151, -0.04073842987418175, -0.018168671056628227, 0.019010910764336586, -0.0070829628966748714, 0.0027498991694301367, 0.07780392467975616, 0.02224385365843773, 0.07973071187734604, 0.09896668046712875, -0.021878136321902275, 0.04719628021121025, -0.079...
0b6e8206-f0be-4fda-b64c-b15d145d3665
0 rows in set. Elapsed: 2.688 sec. Processed 266.05 thousand rows, 48.30 MB (98.97 thousand rows/s., 17.97 MB/s.) ``` line_changes ```sql INSERT INTO git.line_changes SELECT * FROM s3('https://datasets-documentation.s3.amazonaws.com/github/commits/clickhouse/line_changes.tsv.xz', 'TSV', ' sign Int8, line_number_...
{"source_file": "github.md"}
[ -0.03405030444264412, -0.05661282688379288, -0.05910445749759674, 0.008108105510473251, -0.010147787630558014, -0.04295364394783974, 0.024047577753663063, -0.0006252343882806599, 0.006401877384632826, 0.054098065942525864, 0.07129473239183426, -0.033691875636577606, 0.0456884428858757, -0....
6c3c5dee-c954-4d78-a510-cab6f3a9fe64
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€time─┬─commit──────┬─change_type─┬─author─────────────┬─path────────────────────────────────────────┬─old_path─┬─lines_added─┬─lines_deleted─┬─commit_message───────────────────────────────────┐ β”‚ 2022-10-30 16:30:51 β”‚ c68ab231f91 β”‚ Modify β”‚ Alexander Tokmakov β”‚ src/Storages/StorageReplicatedMergeT...
{"source_file": "github.md"}
[ -0.02357364073395729, 0.009524907916784286, 0.01029194612056017, -0.005953008309006691, 0.015866104513406754, -0.08322105556726456, 0.05654730275273323, -0.02563278004527092, 0.008831488899886608, 0.08558627218008041, 0.06668209284543991, -0.012361399829387665, 0.07361352443695068, -0.0066...
dd0ff15c-8c3a-401d-9a0f-3c37ee084546
We can also review the line changes, excluding renames i.e. we won't show changes before a rename event when the file existed under a different name: play ```sql SELECT time, substring(commit_hash, 1, 11) AS commit, sign, line_number_old, line_number_new, author, line FROM git.line_chang...
{"source_file": "github.md"}
[ -0.031056104227900505, -0.03579781576991081, 0.023127511143684387, -0.022563161328434944, -0.012448033317923546, -0.0032008166890591383, 0.04740598797798157, 0.013570506125688553, 0.10939860343933105, 0.07890691608190536, 0.02428325079381466, 0.01642855629324913, 0.00405453285202384, -0.06...
a383c8c2-09ef-4425-953d-b81e5c712152
Note there appears to have been a broken commit history in relation to files under the dbms , libs , tests/testflows/ directories during their renames. We also thus exclude these. play ```sql SELECT path FROM ( SELECT old_path AS path, max(time) AS last_time, 2 AS change_type FRO...
{"source_file": "github.md"}
[ -0.016298901289701462, -0.06360838562250137, -0.0035072762984782457, -0.02705131284892559, 0.026177331805229187, -0.03244304284453392, 0.05574077367782593, -0.006574583239853382, 0.0804273709654808, 0.05385192856192589, 0.018540851771831512, 0.0256949495524168, 0.02894873172044754, 0.00472...
4b814372-0e1d-4378-b8d7-1b9aafd2a153
--skip-paths 'generated\.cpp|^(contrib|docs?|website|libs/(libcityhash|liblz4|libdivide|libvectorclass|libdouble-conversion|libcpuid|libzstd|libfarmhash|libmetrohash|libpoco|libwidechar_width))/' Applying this pattern to git list-files , reports 18155. bash git ls-files | grep -v -E 'generated\.cpp|^(contrib|docs?...
{"source_file": "github.md"}
[ -0.07448600232601166, 0.018908413127064705, 0.028830599039793015, -0.03845997899770737, 0.07512759417295456, -0.04355928301811218, 0.04045676067471504, 0.03492429479956627, 0.049668654799461365, 0.0304417684674263, 0.06960399448871613, -0.006798570975661278, 0.024058490991592407, -0.040262...
a90c9a0a-8ad0-4f82-9d98-58e19d20cab7
β”Œβ”€change_type─┬─path───────────────────────────────┬─old_path───────────────────────────┬────────────────time─┬─commit_hash──────────────────────────────┐ β”‚ Add β”‚ src/Functions/geometryFromColumn.h β”‚ β”‚ 2021-03-11 12:08:16 β”‚ 9376b676e9a9bb8911b872e1887da85a45f7479d β”‚ β”‚ Modi...
{"source_file": "github.md"}
[ -0.041834622621536255, -0.003750588744878769, 0.021761644631624222, -0.07314731180667877, 0.04682988300919533, -0.05858258157968521, -0.06027799844741821, -0.025432372465729713, 0.014640538021922112, 0.08131226152181625, 0.04303513467311859, -0.034048549830913544, 0.026488158851861954, -0....
3e10ed24-b910-42eb-af05-9baf35fc01a3
List files with most modifications {#list-files-with-most-modifications} Limiting to current files, we consider the number of modifications to be the sum of deletes and additions. play ```sql WITH current_files AS ( SELECT path FROM ( SELECT old_path AS path...
{"source_file": "github.md"}
[ 0.015914810821413994, -0.03451930731534958, 0.018228968605399132, -0.011643643490970135, 0.03601008653640747, 0.0018248986452817917, 0.1349666267633438, 0.05041762441396713, 0.021364543586969376, 0.10255171358585358, 0.010056288912892342, 0.06785456836223602, 0.03346735239028931, -0.014999...
911d3104-2249-4545-8722-8fc69caa81a1
History of subdirectory/file - number of lines, commits and contributors over time {#history-of-subdirectoryfile---number-of-lines-commits-and-contributors-over-time} This would produce a large query result that is unrealistic to show or visualize if unfiltered. We, therefore, allow a file or subdirectory to be filte...
{"source_file": "github.md"}
[ -0.016005603596568108, -0.03871601074934006, -0.021735703572630882, 0.01930692419409752, 0.04658044874668121, 0.06530321389436722, 0.05152740702033043, -0.03759538754820824, 0.021220270544290543, 0.04473090171813965, -0.0000943408376770094, -0.006938114296644926, 0.034482356160879135, -0.0...
8d71087e-de2e-4f35-9248-ecef729ec3cd
β”Œβ”€path────────────────────────────────────────┬─num_authors─┐ β”‚ src/Core/Settings.h β”‚ 127 β”‚ β”‚ CMakeLists.txt β”‚ 96 β”‚ β”‚ .gitmodules β”‚ 85 β”‚ β”‚ src/Storages/MergeTree/MergeTreeData.cpp β”‚ 72 β”‚ β”‚ src/CMak...
{"source_file": "github.md"}
[ 0.017635036259889603, -0.03241413086652756, -0.027368873357772827, -0.04148072376847267, -0.005648620426654816, -0.05309499055147171, 0.03206612169742584, 0.07887290418148041, -0.026128262281417847, 0.07399284094572067, 0.04800533130764961, 0.032932113856077194, 0.043464452028274536, -0.07...
56f1c334-0af0-4386-80d7-ebe8235eb29f
β”Œβ”€file_path───────────────────────────────────┬─line────────────────────────────────────────────────────────┬───────latest_change─┬─any(file_change_type)─┐ β”‚ utils/compressor/test.sh β”‚ ./compressor -d < compressor.snp > compressor2 β”‚ 2011-06-17 22:19:39 β”‚ Modify β”‚ β”‚ utils/...
{"source_file": "github.md"}
[ -0.11936286091804504, 0.07175913453102112, -0.015211476013064384, -0.025830406695604324, 0.06668839603662491, -0.02278784103691578, -0.040248893201351166, 0.03744000196456909, 0.00740476930513978, 0.058139368891716, 0.0874210074543953, 0.01175699383020401, 0.010874191299080849, -0.07015599...
066467f2-3613-47f1-922f-89c6f9b88406
β”Œβ”€β”€β”€c─┬─path────────────────────────────────────────┬───────latest_change─┐ β”‚ 790 β”‚ src/Storages/StorageReplicatedMergeTree.cpp β”‚ 2022-10-30 16:30:51 β”‚ β”‚ 788 β”‚ src/Storages/MergeTree/MergeTreeData.cpp β”‚ 2022-11-04 09:26:44 β”‚ β”‚ 752 β”‚ src/Core/Settings.h β”‚ 2022-10-25 11:35:25 β”‚ β”‚ 749 β”‚ CMakeLis...
{"source_file": "github.md"}
[ -0.023332763463258743, -0.003127165837213397, 0.002752848668023944, -0.01042608730494976, 0.04347454756498337, -0.09491419047117233, 0.03313225135207176, 0.06254434585571289, 0.01987856812775135, 0.025601567700505257, 0.06248002126812935, -0.036155227571725845, 0.04811643064022064, -0.0546...
0d6d0fb0-29dd-43ad-8318-01e9e60b1d69
β”Œβ”€day─┬─bar─────────────────────────────────────────────────────────────┐ β”‚ 1 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ– β”‚ β”‚ 2 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹ β”‚ β”‚ 3 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹ β”‚ β”‚ 4 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ ...
{"source_file": "github.md"}
[ -0.05390174686908722, -0.022587832063436508, -0.014351698569953442, 0.07572145760059357, 0.027960708364844322, -0.08990379422903061, 0.00953185185790062, 0.0010148724541068077, -0.01583847962319851, 0.1022038459777832, 0.05588790029287338, -0.014732646755874157, 0.05079555884003639, -0.077...
9276579e-36f5-4147-b1eb-a4fb0d1c502e
Authors with the most diverse impact {#authors-with-the-most-diverse-impact} We consider diversity here to be the number of unique files an author has contributed to. play ```sql SELECT author, uniq(path) AS num_files FROM git.file_changes WHERE (change_type IN ('Add', 'Modify')) AND (file_extension IN ('...
{"source_file": "github.md"}
[ 0.027167312800884247, -0.037394482642412186, -0.015056374482810497, -0.007514967583119869, 0.03418009355664253, 0.009741706773638725, 0.09029633551836014, 0.040081918239593506, 0.02735838107764721, 0.082981176674366, 0.008979463018476963, 0.03210823982954025, 0.028812577947974205, -0.08013...
bbc752da-eff3-4e11-9261-807ca5ad63d8
Favorite files for an author {#favorite-files-for-an-author} Here we select our founder Alexey Milovidov and limit our analysis to current files. play ```sql WITH current_files AS ( SELECT path FROM ( SELECT old_path AS path, max(time) AS l...
{"source_file": "github.md"}
[ 0.024754099547863007, -0.035298481583595276, 0.008791450411081314, 0.0005888650193810463, 0.050624169409275055, 0.03642435744404793, 0.1569964736700058, 0.053666915744543076, 0.024290556088089943, 0.045340895652770996, -0.02598552592098713, 0.04834091290831566, 0.07051122933626175, -0.0402...
72ee426a-331f-4ad3-b8ef-b8383b7f0218
This is maybe more reflective of his areas of interest. Largest files with lowest number of authors {#largest-files-with-lowest-number-of-authors} For this, we first need to identify the largest files. Estimating this via a full file reconstruction, for every file, from the history of commits will be very expensive...
{"source_file": "github.md"}
[ 0.02357378602027893, -0.041916217654943466, 0.006798830348998308, 0.0020052511245012283, 0.007476718630641699, -0.00590736186131835, 0.05321379750967026, 0.03945767506957054, 0.023509955033659935, 0.07721830904483795, -0.022754086181521416, 0.039458248764276505, 0.028253398835659027, 0.003...
ca4e1194-dd58-4cf3-bc13-ed3c13335c29
10 rows in set. Elapsed: 0.138 sec. Processed 798.15 thousand rows, 16.57 MB (5.79 million rows/s., 120.11 MB/s.) ``` Text dictionaries aren't maybe realistic, so lets restrict to code only via a file extension filter! play ```sql WITH current_files AS ( SELECT path FROM ( ...
{"source_file": "github.md"}
[ 0.04204659163951874, -0.04680045321583748, -0.013020047917962074, -0.020011359825730324, 0.0006442085723392665, -0.05194120854139328, 0.07320474833250046, 0.0005753614823333919, -0.010560920462012291, 0.07498665899038315, 0.025677809491753578, 0.057686660438776016, 0.01801707223057747, -0....
deb741c4-ce20-4f9c-8d22-aa73e8f2960a
There is some recency bias in this - newer files have fewer opportunities for commits. What about if we restrict to files at least 1 yr old? play ```sql WITH current_files AS ( SELECT path FROM ( SELECT old_path AS path, max(time) AS last_time,...
{"source_file": "github.md"}
[ 0.008833101019263268, -0.08369927108287811, 0.0019385311752557755, -0.008334089070558548, 0.030405975878238678, 0.011459418572485447, 0.03607713431119919, 0.017399931326508522, 0.04860330745577812, 0.07620944827795029, 0.014405898749828339, 0.07511488348245621, 0.016372613608837128, -0.010...
d44cb20e-ed0d-43a6-be7d-e343511c6d7c
10 rows in set. Elapsed: 0.143 sec. Processed 798.15 thousand rows, 18.00 MB (5.58 million rows/s., 125.87 MB/s.) ``` Commits and lines of code distribution by time; by weekday, by author; for specific subdirectories {#commits-and-lines-of-code-distribution-by-time-by-weekday-by-author-for-specific-subdirectories} ...
{"source_file": "github.md"}
[ -0.023654798045754433, -0.021371254697442055, -0.020779509097337723, 0.024495569989085197, -0.025781279429793358, -0.036867402493953705, 0.06626082211732864, 0.006888297852128744, 0.03451602905988693, 0.06127490475773811, 0.022189294919371605, 0.022508684545755386, 0.022931130602955818, -0...
c79d5f0f-b7a1-4326-8946-7f4e2fade002
24 rows in set. Elapsed: 0.039 sec. Processed 266.05 thousand rows, 14.66 MB (6.77 million rows/s., 372.89 MB/s.) ``` This distribution makes sense given most of our development team is in Amsterdam. The bar functions helps us visualize these distributions: play ```sql SELECT hourOfDay, bar(commits, 0, ...
{"source_file": "github.md"}
[ 0.041589610278606415, -0.04110854119062424, 0.009146220050752163, -0.01781029999256134, -0.06968434900045395, -0.05565328523516655, -0.011570721864700317, 0.010869710706174374, 0.06934966146945953, 0.09534668177366257, 0.04887959733605385, -0.02918867953121662, 0.041960276663303375, -0.055...
0345e968-509d-4cd5-8616-d9a7632d9424
β”Œβ”€hourOfDay─┬─commits───────────────────────┬─lines_added────────────────────────────────────────┬─lines_deleted──────────────────────────────────────┐ β”‚ 0 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž β”‚ β”‚ 1 β”‚ β–ˆβ–ˆ...
{"source_file": "github.md"}
[ -0.0036505332682281733, -0.007561025209724903, -0.04185090586543083, -0.007487685885280371, -0.040836237370967865, -0.03468731418251991, 0.027736281976103783, -0.07329637557268143, -0.021637357771396637, 0.09360013902187347, 0.054234884679317474, -0.02622048743069172, 0.038357850164175034, ...
cf861966-149f-495e-8bd5-5b4d0c790809
β”‚ 17 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ– β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹ β”‚ β”‚ 18 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ– β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Š β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β”‚ β”‚ 19 β”‚ β–ˆβ–ˆ...
{"source_file": "github.md"}
[ 0.027299916371703148, 0.023766981437802315, -0.029305437579751015, 0.003133162157610059, 0.001374101615510881, 0.0011350432178005576, 0.025802619755268097, -0.058539729565382004, -0.028902672231197357, 0.09316836297512054, 0.09676660597324371, 0.007784352172166109, 0.028681190684437752, -0...
976fbfc7-7ba9-4217-90c3-0b43fc754af0
24 rows in set. Elapsed: 0.038 sec. Processed 266.05 thousand rows, 14.66 MB (7.09 million rows/s., 390.69 MB/s.) ``` Matrix of authors that shows what authors tends to rewrite another authors code {#matrix-of-authors-that-shows-what-authors-tends-to-rewrite-another-authors-code} The sign = -1 indicates a code de...
{"source_file": "github.md"}
[ 0.04478317126631737, -0.012696857564151287, -0.018256209790706635, -0.004285986535251141, -0.0538487434387207, -0.004000967834144831, 0.05008146911859512, -0.025623047724366188, 0.027934344485402107, 0.07629960775375366, 0.04404295235872269, 0.06450197845697403, 0.027318255975842476, -0.13...
2f346f4a-6e57-49d6-a0f6-db57230e6a6a
```sql SELECT day_of_week, author, count() AS c FROM git.commits GROUP BY dayOfWeek(time) AS day_of_week, author ORDER BY day_of_week ASC, c DESC LIMIT 1 BY day_of_week β”Œβ”€day_of_week─┬─author───────────┬────c─┐ β”‚ 1 β”‚ Alexey Milovidov β”‚ 2204 β”‚ β”‚ 2 β”‚ Alexey Milovidov β”‚ 15...
{"source_file": "github.md"}
[ -0.00078334950376302, -0.02588997595012188, -0.03230695798993111, 0.056491345167160034, -0.04705201834440231, 0.0037325953599065542, 0.06332848221063614, 0.008797211572527885, -0.029651837423443794, 0.08368809521198273, -0.043377649039030075, 0.010550354607403278, 0.006640605162829161, -0....
a3854186-faa3-434d-8a2b-bfc14ee46b14
β”Œβ”€day_of_week─┬─author──────────────┬──top_author_percent─┐ β”‚ 1 β”‚ Alexey Milovidov β”‚ 0.3168282877768332 β”‚ β”‚ 2 β”‚ Mikhail f. Shiryaev β”‚ 0.3523434231193969 β”‚ β”‚ 3 β”‚ vdimir β”‚ 0.11859742484577324 β”‚ β”‚ 4 β”‚ Nikolay Degterinsky β”‚ 0.34577318920318467 β”‚ β”‚ 5 β”‚ Alex...
{"source_file": "github.md"}
[ -0.06541705876588821, -0.004851421806961298, -0.04827461019158363, 0.0016361394664272666, 0.05925016105175018, -0.0404147170484066, -0.01575326733291149, 0.022111257538199425, -0.03153539448976517, 0.10488996654748917, -0.009160969406366348, 0.000749186787288636, 0.05330744758248329, -0.07...
7b48cffd-9bf6-4514-a982-b0fe713ba680
β”Œβ”€folder───────────────────────────┬─avg_age_of_files─┬─min_age_files─┬─max_age_files─┬────c─┐ β”‚ base/base β”‚ 387 β”‚ 201 β”‚ 397 β”‚ 84 β”‚ β”‚ base/glibc-compatibility β”‚ 887 β”‚ 59 β”‚ 993 β”‚ 19 β”‚ β”‚ base/consistent-hashing ...
{"source_file": "github.md"}
[ 0.00922255776822567, 0.002901060739532113, -0.034291334450244904, -0.03762111812829971, 0.020692089572548866, -0.10861364752054214, 0.01072385162115097, 0.029397541657090187, -0.07616245001554489, 0.06391296535730362, 0.05909878760576248, -0.018425295129418373, 0.09561052918434143, -0.0418...
31ac079f-909b-417b-a41c-738728b81ea3
For this question, we need the number of lines written by an author divided by the total number of lines they have had removed by another contributor. play ```sql SELECT k, written_code.c, removed_code.c, removed_code.c / written_code.c AS remove_ratio FROM ( SELECT author AS k, ...
{"source_file": "github.md"}
[ 0.014962565153837204, 0.009156816639006138, 0.01350306160748005, -0.013958660885691643, -0.0674344152212143, 0.07090415060520172, 0.07534793019294739, 0.024267492815852165, 0.005751691292971373, 0.03719047084450722, 0.06142314150929451, 0.03696029633283615, 0.03150152042508125, -0.07761973...
2a76c714-d6cf-4dbb-adda-91f035450a8d
β”Œβ”€path───────────────────────────────────────────────────┬─────c─┐ β”‚ src/Storages/StorageReplicatedMergeTree.cpp β”‚ 21871 β”‚ β”‚ src/Storages/MergeTree/MergeTreeData.cpp β”‚ 17709 β”‚ β”‚ programs/client/Client.cpp β”‚ 15882 β”‚ β”‚ src/Storages/MergeTree/MergeTreeDataSelectExecutor...
{"source_file": "github.md"}
[ -0.04141505807638168, -0.03342369571328163, 0.004626397974789143, 0.004965824540704489, -0.03371899947524071, -0.07797825336456299, 0.057369664311409, 0.038899749517440796, 0.042695190757513046, 0.03749912977218628, 0.0036287307739257812, -0.0639253556728363, 0.021707767620682716, -0.05086...
73d704ac-8952-47cb-8d85-42adc1fa9f4b
play ```sql WITH current_files AS ( SELECT path FROM ( SELECT old_path AS path, max(time) AS last_time, 2 AS change_type FROM git.file_changes GROUP BY old_path UNION ALL SELECT ...
{"source_file": "github.md"}
[ 0.04680149629712105, -0.06365841627120972, -0.006871780380606651, -0.00348671805113554, 0.002460623160004616, 0.01183319091796875, 0.07599503546953201, 0.011857002042233944, 0.009305745363235474, 0.08408278226852417, 0.01803191937506199, 0.0602678582072258, 0.03411600738763809, -0.00389403...
6389b537-4c8d-4404-880c-c15d55c3b6ef
10 rows in set. Elapsed: 0.299 sec. Processed 798.15 thousand rows, 31.52 MB (2.67 million rows/s., 105.29 MB/s.) ``` What weekday does the code have the highest chance to stay in the repository? {#what-weekday-does-the-code-have-the-highest-chance-to-stay-in-the-repository} For this, we need to identify a line of ...
{"source_file": "github.md"}
[ -0.05650338530540466, -0.03078063577413559, -0.01990208588540554, 0.015166079625487328, -0.05489924177527428, -0.00553941773250699, 0.06339779496192932, -0.013377602212131023, -0.017000941559672356, 0.02350863814353943, -0.02583147957921028, 0.016191978007555008, 0.026784079149365425, -0.0...
594aff32-37cf-4f84-8926-fb2c45ea4088
play ```sql WITH current_files AS ( SELECT path FROM ( SELECT old_path AS path, max(time) AS last_time, 2 AS change_type FROM git.file_changes GROUP BY old_path UNION ALL SELECT ...
{"source_file": "github.md"}
[ 0.04563676938414574, -0.04087383672595024, 0.0077777449041605, 0.010036617517471313, -0.010184836573898792, 0.013261663727462292, 0.07003055512905121, 0.00541806872934103, -0.020863015204668045, 0.06394725292921066, 0.03321799635887146, 0.04853398725390434, 0.04009504243731499, -0.02138831...
63d671db-6d1a-45f9-87f2-e30c89006903
10 rows in set. Elapsed: 3.134 sec. Processed 16.13 million rows, 1.83 GB (5.15 million rows/s., 582.99 MB/s.) ``` Who tends to write more tests / CPP code / comments? {#who-tends-to-write-more-tests--cpp-code--comments} There are a few ways we can address this question. Focusing on the code to test ratio, this que...
{"source_file": "github.md"}
[ 0.06002547964453697, -0.0610051155090332, -0.053301382809877396, 0.015054651536047459, -0.03873846307396889, 0.013108888640999794, 0.04044165089726448, 0.04685596749186516, -0.0058349003084003925, 0.08632250130176544, 0.020344190299510956, -0.04017161950469017, 0.045823704451322556, -0.060...
0104df75-cfd4-4e79-977f-83e411b86e10
20 rows in set. Elapsed: 0.034 sec. Processed 266.05 thousand rows, 4.65 MB (7.93 million rows/s., 138.76 MB/s.) ``` We can plot this distribution as a histogram. play ```sql WITH ( SELECT histogram(10)(ratio_code) AS hist FROM ( SELECT author, c...
{"source_file": "github.md"}
[ 0.07620774209499359, -0.02144732140004635, -0.04705881327390671, -0.027956347912549973, -0.03708361089229584, -0.025648802518844604, 0.06802956014871597, 0.02129710465669632, -0.03419165313243866, 0.0796247348189354, 0.07736027985811234, -0.020450931042432785, 0.07385184615850449, -0.04975...
a91fe08b-9b34-4830-b768-e3efaba848c3
Most contributors write more code than tests, as you'd expect. What about who adds the most comments when contributing code? play sql SELECT author, avg(ratio_comments) AS avg_ratio_comments, sum(code) AS code FROM ( SELECT author, commit_hash, countIf(line_type = 'Comment'...
{"source_file": "github.md"}
[ 0.00558937294408679, -0.09327466040849686, -0.032460812479257584, 0.007017334457486868, -0.0347311869263649, 0.0023481324315071106, 0.054470889270305634, 0.02424345538020134, 0.01929190568625927, 0.07849948108196259, 0.009201101958751678, -0.011436671018600464, 0.01611788384616375, -0.0793...
64cf1890-8d23-4f76-ad12-7c19d998126b
β”Œβ”€author──────────────────────┬─code_lines─┬─comments─┬─────────ratio_code─┬───────week─┐ β”‚ 1lann β”‚ 8 β”‚ 0 β”‚ 1 β”‚ 2022-03-06 β”‚ β”‚ 20018712 β”‚ 2 β”‚ 0 β”‚ 1 β”‚ 2020-09-13 β”‚ β”‚ 243f6a8885a308d313198a2e037 β”‚ 0 β”‚ ...
{"source_file": "github.md"}
[ -0.04431293159723282, -0.03112984634935856, -0.07208969444036484, -0.036060407757759094, -0.008594905957579613, 0.041094474494457245, 0.05324958264827728, -0.00326547771692276, -0.014602511189877987, 0.07586994767189026, -0.007020085584372282, 0.026900526136159897, 0.0517934113740921, 0.05...
34b95775-351d-45c0-bcfd-c5ed3c744e1f
After calculating the average by-week offset across all authors, we sample these results by selecting every 10th week. play ```sql WITH author_ratios_by_offset AS ( SELECT author, dateDiff('week', start_dates.start_date, contributions.week) AS week_offset, ratio_code ...
{"source_file": "github.md"}
[ 0.02478283829987049, -0.024488316848874092, 0.021985920146107674, 0.02613505721092224, -0.026574740186333656, 0.08634164184331894, 0.027158869430422783, 0.0614648163318634, -0.05147644877433777, 0.03505362942814827, 0.023215269669890404, -0.0235283225774765, 0.012684285640716553, -0.033283...
9c5166f3-3730-47e8-b449-b9211e9e350c
play ```sql WITH changes AS ( SELECT path, commit_hash, max_time, type, num_added, num_deleted, sum(num_added - num_deleted) OVER (PARTITION BY path ORDER BY max_time ASC) AS current_size, if(current_size >...
{"source_file": "github.md"}
[ 0.038095757365226746, -0.020826278254389763, -0.007553055416792631, -0.023011095821857452, -0.019238179549574852, -0.01149779837578535, 0.049769241362810135, 0.01729212887585163, 0.03805017098784447, 0.11220090836286545, 0.04960373416543007, 0.017454400658607483, 0.016001863405108452, -0.0...
c45be7a3-65cd-4cfd-b568-110110173443
play ```sql WITH changes AS ( SELECT path, commit_hash, max_time, type, num_added, num_deleted, sum(num_added - num_deleted) OVER (PARTITION BY path ORDER BY max_time ASC) AS current_size, if(current_size >...
{"source_file": "github.md"}
[ 0.046090852469205856, -0.0244214478880167, -0.01651860773563385, -0.026985932141542435, -0.027895187959074974, 0.009337466210126877, 0.05509492754936218, 0.025018680840730667, 0.037732720375061035, 0.11318658292293549, 0.05671011283993721, 0.021260598674416542, 0.024085665121674538, -0.006...
dc481c4b-66fe-482f-a06b-d362a59f8946
play ```sql WITH changes AS ( SELECT path, author, commit_hash, max_time, type, num_added, num_deleted, sum(num_added - num_deleted) OVER (PARTITION BY path ORDER BY max_time ASC) AS current_size, ...
{"source_file": "github.md"}
[ 0.04203003644943237, -0.024402311071753502, -0.026416543871164322, -0.022832220420241356, -0.03620108589529991, 0.017915884032845497, 0.06930958479642868, 0.0210261270403862, 0.025654174387454987, 0.11362184584140778, 0.04776247218251228, 0.023407328873872757, 0.03258124738931656, -0.01541...
c8f925b0-ab60-45a6-bb0b-b3fbc0dbb797
Most consecutive days of commits by an author {#most-consecutive-days-of-commits-by-an-author} This query first requires us to calculate the days when an author has committed. Using a window function, partitioning by author, we can compute the days between their commits. For each commit, if the time since the last co...
{"source_file": "github.md"}
[ 0.03616895154118538, 0.026513725519180298, -0.030432164669036865, -0.041308287531137466, -0.06796924769878387, 0.017911052331328392, 0.010187163949012756, -0.05167338252067566, -0.00991013552993536, 0.01876491867005825, -0.046800121665000916, 0.03031625971198082, -0.017631592229008675, 0.0...
6134cc7c-d222-4baf-a12b-276c17a9cc2e
```sql SELECT time, path, old_path, commit_hash, commit_message FROM git.file_changes WHERE (path = 'src/Storages/StorageReplicatedMergeTree.cpp') AND (change_type = 'Rename') β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€time─┬─path────────────────────────────────────────┬─old_path─────────────────────────────────────┬─commi...
{"source_file": "github.md"}
[ -0.010641125962138176, -0.0215928852558136, -0.04862450063228607, 0.029138537123799324, -0.014343801885843277, -0.0671824961900711, 0.03245177119970322, 0.034846704453229904, 0.04735076427459717, 0.09526704996824265, 0.02465677633881569, 0.011119669303297997, 0.023615214973688126, -0.03454...
b06a3cbe-c9cf-42fc-92c2-a6ce0d3c610f
For example, ```sql SELECT file_path_history('src/Storages/StorageReplicatedMergeTree.cpp') AS paths β”Œβ”€paths─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ β”‚ ['src/Storages/StorageReplicatedMergeTree.cpp','dbms/Storages/S...
{"source_file": "github.md"}
[ 0.010330050252377987, 0.008966848254203796, -0.059523604810237885, 0.055445726960897446, -0.0368652306497097, -0.05089089274406433, 0.008249987848103046, 0.037317752838134766, 0.07081883400678635, 0.10604031383991241, 0.024256153032183647, 0.022556954994797707, 0.04517001286149025, -0.0427...
7fdf0bbe-7a49-44e2-8ccc-c0ac415c6dac
β”Œβ”€line_number_new─┬─argMax(author, time)─┬─argMax(line, time)────────────────────────────────────────────┐ β”‚ 1 β”‚ Alexey Milovidov β”‚ #include β”‚ β”‚ 2 β”‚ s-kat β”‚ #include β”‚ β”‚ 3 β”‚ Anton Popov β”‚ #inc...
{"source_file": "github.md"}
[ -0.028018254786729813, -0.013560133054852486, -0.06202063709497452, 0.0304199680685997, 0.0182782169431448, -0.011359075084328651, 0.04245283082127571, -0.006049191579222679, -0.0008285603253170848, 0.08720199763774872, -0.016718463972210884, -0.023494046181440353, 0.045389000326395035, -0...