Files
Rocketmc/apps/labrinth/.sqlx/query-2fb4c034099267e2268821d1806fe28d540625e9713fcd88b4a965130245c1ee.json
François-Xavier Talbot 006b19e3c9 Creator tax compliance (#4254)
* Initial implementation

* Remove test code

* Query cache

* Appease clippy

* Precise TIN/SSN

* Make tax threshold customizable via env variable

* Address review comments
2025-08-25 16:34:58 +00:00

35 lines
861 B
JSON

{
"db_name": "PostgreSQL",
"query": "\n SELECT\n SUM(amount) amount,\n SUM(fee) fee,\n SUM(amount) FILTER (WHERE created >= DATE_TRUNC('year', NOW())) amount_this_year\n FROM payouts\n WHERE user_id = $1 AND (status = 'success' OR status = 'in-transit')\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "amount",
"type_info": "Numeric"
},
{
"ordinal": 1,
"name": "fee",
"type_info": "Numeric"
},
{
"ordinal": 2,
"name": "amount_this_year",
"type_info": "Numeric"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
null,
null,
null
]
},
"hash": "2fb4c034099267e2268821d1806fe28d540625e9713fcd88b4a965130245c1ee"
}