I am sending out invitations to my daughter's wedding, and trying to use Base to
keep track of the responses. (I already have tables, which I used for *sending* the invitations).
I am trying to figure out how to create an SQL query to do what seems to me a very simple operation:
To list all the records of a table, PLUS a sum of specific columns at the end. In this case:
Lastname Firstname Number_invited Number_RSVP
I can get the list of responses:
SELECT "Lastname", "Firstname", "Invited", "RSVP" FROM "WeddingDB"
And I can get the totals by themselves:
SELECT SUM( "Invited" ) AS "Invited", SUM( "RSVP" ) AS "RSVP" FROM "WeddingDB"
But what I wanted was both in one query, with output like this:
Code: Select all
Lastname Firstname Invited RSVP
Miller George 2 0
Smith John 2 2
Tailor Robert 4 3
Walker Henry 3 1
SUM: 11 6I would appreciate any help!
Thank you,
Shimon