echo "FEHLTAGE"
psql -q pgtest << EOF
 explain SELECT k.kname as grund, count(*) AS fehltage
	FROM kunden k, tage t WHERE
	t.begt >= 'Jan 01 00:00:00 1998 CET' AND
	t.kid = k.kid AND
	( t.kid = 23 OR
	  t.kid = 36 )
	GROUP BY grund ORDER BY grund;
EOF
