SQ

SQLite query inside a Bash function

Hacker News

SQLite query inside a Bash function

Part of the workflow for building my website is the generation of a table in tab-separated column format (.tsv). The source data is found in four other .tsv files. I use an SQLite query to perform a 4-way join and write out the new table. For convenience, I wrote a script that encapsulates the query inside a Bash function. The example below illustrates this technique. repertoire() { pushd $CMM_SOURCES/_data sqlite3 <<EOS .headers on .mode tabs .import category.tsv category .import composition.tsv composition .import concert.tsv concert .import program.tsv program .once repertoire.tsv SELECT category.name AS category, composition.key, composition.composer, composition.name AS composition, concert.name AS concert FROM category, concert, composition, program WHERE julianday(concert.date) < julianday('now') AND composition.category = category.name AND program.key = composition.key AND program.date = concert.date ORDER BY category.sequence, composition.key ; EOS popd }

Share card

Actual performance

134points
62comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: new · Missing: mac, agents, macos
73%73% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
51%51% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersIH features products with proven revenue · Strong signals: para · Missing: supports, reddit linkedin, podcasting
45%45% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way, para · Missing: mobile apps, ios, personal
29%29% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
28%28% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
19%19% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
13%13% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Te
TensorFlowithInception as an OpenFaaS function34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TensorFlowithInception as an OpenFaaS function

Hacker News4
Te
TensorFlow ImageNet/Inception as an OpenFaaS function48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TensorFlow ImageNet/Inception as an OpenFaaS function

Hacker News4
Ad
Added Supporting Function by Patreon to Pixela63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Added Supporting Function by Patreon to Pixela

Hacker News1
We
Weighted Scoring Function for CodersBracket32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Weighted Scoring Function for CodersBracket

Hacker News1
Mo
Monglorious – Query MongoDB with Strings33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Monglorious – Query MongoDB with Strings

Hacker News2
Qu
Query the national alcoholic beverage retailing monopoly of Finland43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Query the national alcoholic beverage retailing monopoly of Finland

Hacker News2
VelocityPack QueryBoost
VelocityPack QueryBoost38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

MySQL / MariaDB Query Caching and Acceleration for cPanel

Indie Hackersemployees-10-plus
SQ
SQLite-S3-query – Python function to query a SQLite database on S369%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SQLite-S3-query – Python function to query a SQLite database on S3

Hacker News38
Re
Relaunch of function-plot – a powerful function plotter54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Relaunch of function-plot – a powerful function plotter

Hacker News4
Im
Immediately-invoked generator function expression (IIGFE)49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Immediately-invoked generator function expression (IIGFE)

Hacker News1