Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
{
"db_name": "PostgreSQL",
"query": "\n SELECT COALESCE(SUM(amount_cents), 0)::bigint AS \"spent!\"\n FROM ai_credit_reload\n WHERE user_id = $1\n AND (status <> 'failed' OR stripe_invoice_id IS NOT NULL)\n -- A purchase whose collector died before Stripe saw it charged\n -- nothing; a paid webhook still books it by reload id.\n AND NOT (kind = 'purchase'\n AND status = 'pending'\n AND stripe_invoice_id IS NULL\n AND updated_at < NOW() - INTERVAL '10 minutes')\n AND created_at >= $2\n AND created_at < $3\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "spent!",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text",
"Timestamptz",
"Timestamptz"
]
},
"nullable": [
null
]
},
"hash": "fc9e94cb5e5dfb5cd994ee771d617a90f22e7489d6b5469c655fdd17e2d0f847"
}