haskell-relational-record/relational-record-examples/sql/6.4.1a.sh
2014-12-15 13:56:39 +09:00

15 lines
238 B
Bash

#! /bin/bash
#Sorting compound query results
sqlite3 examples.db "
SELECT emp_id, assigned_branch_id
FROM employee
WHERE title = 'Teller'
UNION
SELECT open_emp_id, open_branch_id
FROM account
WHERE product_cd = 'SAV'
ORDER BY emp_id
;"