Created
October 10, 2014 15:15
-
-
Save nhomar/60c3a226ddb5e274b584 to your computer and use it in GitHub Desktop.
difference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
l.account_id, | |
sum(l.debit-l.credit) | |
FROM account_move_line AS l | |
INNER JOIN account_account AS a ON a.id = l.account_id | |
WHERE l.debit-l.credit != 0 AND a.code ilike '1-1-08%' //<<ug l | |
GROUP BY account_id | |
/* | |
Tiempo de ejecución de la sentencia: 11.56 segundos | |
*/ | |
SELECT | |
l.account_id, | |
sum(l.debit-l.credit) | |
FROM account_move_line AS l | |
INNER JOIN account_account AS a ON a.id = l.account_id | |
WHERE l.debit-l.credit != 0 AND a.parent_id = 462 // <<technically perfect and functionally perfect | |
GROUP BY account_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment