sql: head works on parent of table, not given table