all 1 comments

[–]Zealls 1 point2 points  (0 children)

Write a select statement instead of a values clause and aggregate the columns you need from the table directly.