Skip to content

Commit

Permalink
Testing PRINTF
Browse files Browse the repository at this point in the history
  • Loading branch information
Darcicat committed Oct 28, 2024
1 parent 78106be commit 34fcc18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql/fashion_magazines.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

SELECT
customers.customer_name AS Customer,
subscriptions.subscription_length*subscriptions.price_per_month AS "Amount Due"
--subscriptions.subscription_length*subscriptions.price_per_month AS "Amount Due"
'$' printf('%.2f', subscriptions.subscription_length * subscriptions.price_per_month) AS "Amount Due"
FROM orders
LEFT JOIN customers ON orders.customer_id = customers.customer_id
LEFT JOIN subscriptions ON orders.subscription_id = subscriptions.subscription_id
Expand Down

0 comments on commit 34fcc18

Please sign in to comment.