#!/usr/bin/env sh

# simple script to list projects and jobs from a pmsco database
#
# usage:
# ./db-list-jobs.sh database_path

printf "%s\n%s;\n" ".mode column" "select projects.name as project, jobs.name as job, jobs.datetime as datetime from projects join jobs on projects.id = jobs.project_id order by project, job, datetime" | sqlite3 "$1"
