This file contains hidden or 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 | |
| Operations.date, | |
| COUNT(distinct Operations.OrderID) as "nombre d'opérations", | |
| SUM(CASE WHEN Operations.type = 'buy' THEN Operations.amount ELSE 0 END) as 'Sous total achat', | |
| SUM(CASE WHEN Operations.type = 'sell' THEN Operations.amount ELSE 0 END) as 'Sous total vente', | |
| SUM(CASE WHEN Payments.method = 'card' THEN Payments.amount ELSE 0 END) as 'Sous total card', | |
| SUM(CASE WHEN Payments.method = 'sepa' THEN Payments.amount ELSE 0 END) as 'Sous total sepa', | |
| SUM(CASE WHEN Payments.method = 'cash' THEN Payments.amount ELSE 0 END) as 'Sous total cash' | |
| SUM(Operations.amount) as 'Total Amount', | |
| SUM(Operations.commission) as 'Commission', |
This file contains hidden or 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 | |
| EXTRACT(year from Operations.date) as 'Année', | |
| EXTRACT(MONTH from Operations.date) as 'Mois' | |
| COUNT(distinct Operations.OrderID) as "nombre d'opérations", | |
| SUM(CASE WHEN Operations.type = 'buy' THEN Operations.amount ELSE 0 END) as 'Sous total achat', | |
| SUM(CASE WHEN Operations.type = 'sell' THEN Operations.amount ELSE 0 END) as 'Sous total vente', | |
| SUM(CASE WHEN Payments.method = 'card' THEN Payments.amount ELSE 0 END) as 'Sous total card', | |
| SUM(CASE WHEN Payments.method = 'sepa' THEN Payments.amount ELSE 0 END) as 'Sous total sepa', | |
| SUM(CASE WHEN Payments.method = 'cash' THEN Payments.amount ELSE 0 END) as 'Sous total cash' | |
| SUM(Payments.amount) as 'Total Amount', |
This file contains hidden or 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
| rm /usr/local/var/postgres/postmaster.pid | |
| sudo launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
| sudo launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist |