Most of the bugs come from misaligned expectations. When working with databases, the first line of defense is to type the expected query results statically. type SubscriptionPayment = {
id: number,
subscriber: string,
amount: number
}; await connection.many(
sql<Person>`
SELECT id, subscriber, amount
FROM subscription_payment
`
); Doing this already…