Skip to content

Instantly share code, notes, and snippets.

@joyrexus
Created July 16, 2013 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joyrexus/6015239 to your computer and use it in GitHub Desktop.
Save joyrexus/6015239 to your computer and use it in GitHub Desktop.
#ldp | Show counts of utts that differ from primary dataset by subj/sess.
-- show counts of utts that differ from primary dataset by subj/sess
--
-- sqlite3 < diff.sql
-- subject session count(*)
-- 39 11 900
-- 55 12 510
-- 77 12 738
-- 100 12 5
ATTACH 'temp.db' AS new;
ATTACH '/Users/jvoigt/Documents/Work/LDP/data/trunk/ldp.db' AS old;
SELECT n.subject, n.session, count(*)
FROM new.utterances AS n, old.utterances AS o
WHERE n.id = o.id
AND (n.p_utts != o.p_utts OR n.c_utts != o.c_utts)
GROUP BY n.subject, n.session;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment