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
import PusherServer from 'pusher'; | |
import { z, ZodSchema } from 'zod'; | |
import PusherClient from 'pusher-js'; | |
const client = new PusherClient('...', { cluster: '...' }); | |
const server = new PusherServer({ | |
appId: '...', | |
key: '...', | |
secret: '...', | |
cluster: '...', |
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 | |
offices.id AS office_id, | |
offices.abbr AS metro_area, | |
substr (payments.date, 1, 7) AS mnth, | |
SUM(payments.amount) AS amount | |
FROM | |
payments | |
INNER JOIN transactions ON transactions.id = payments.transaction_id | |
INNER JOIN customers ON customers.id = transactions.customer_id | |
INNER JOIN offices ON offices.id = customers.office_id |
OlderNewer