If Bard is using PaLM 2, Google is in serious trouble. Here's its offering for "the simplest PostgreSQL query to get month-over-month volume and percentage change." Note that no actual calculations take place and the query generates a syntax error because it references a phantom column. GPT 3.5 and 4 handle this with ease.
SELECT
month,
volume,
percentage_change
FROM (
SELECT
date_trunc('month', created_at) AS month,
SUM(quantity) AS volume
FROM orders
GROUP BY date_trunc('month', created_at)
) AS monthly_orders
ORDER BY month;
SELECT month, volume, percentage_change FROM ( SELECT date_trunc('month', created_at) AS month, SUM(quantity) AS volume FROM orders GROUP BY date_trunc('month', created_at) ) AS monthly_orders ORDER BY month;