Question: I want a function taking an unevaluated expression containing variable names into a new expression containing string for the variable names.

`c(a,b)`

should be converted to

`c("a","b")`

How can this be done?

Let me explain in more detail what I want to achieve.

```
my_tibble <-
  tibble(a=rep(c("a","b"),each=4),
              b=rep(rep(c("x","y"),each=2),2),
              x=seq_along(b)
  )

```

```
summary_groupwise <- function(data,group_var,var_to_summarise,result_var){
  data |>
    group_by({{group_var}}) |>
    summarise({{result_var}} := sum({{var_to_summarise}}))
}

```

This function works

```
summary_groupwise(my_tibble,a,x,group_sum)

```

Now I want to group by multiple variables

```
summary_groupwise_multiple <- function(data,group_vars,var_to_summarise,result_var){
  data |>
    group_by(across(all_of({{group_vars}}))) |>
    summarise({{result_var}} := sum({{var_to_summarise}}))
}

```

This works:

```
summary_groupwise_multiple(my_tibble,c("a","b"),x,group_sums)

```

To make `summary_groupwise_multiple` work, the names of the grouping variables have to be given as strings.

For consistency of the syntax, I would like the following call to work

```
summary_groupwise_multiple(my_tibble,c(a,b),x,group_sums)

```

How can is fiddle with the parameter `group_vars` so the call works without giving the names of the variables as strings.

Answer: 
If you want to write a sub query then you can try this

```
INSERT INTO Person
    (
    AddressKey,
    FirstName,
    LastName,
    DateofBirth
    )
SELECT a.AddressKey, 'Theresa', 'May', '1956-10-01' FROM Address a WHERE a.PostCode = 'SL1 1AA' AND a.HouseNumber = 32;

```
Try this:

```
INSERT INTO Person
    SELECT
        AddressKey  =   (SELECT AddressKey FROM Address WHERE Postcode = 'SW1A 2AA' AND HouseNumber = 10)
    ,   FirstName   =   'Boris'
    ,   LastName    =   'Johnson'
    ,   DateofBirth =   '1964-06-19'
;
INSERT INTO Person
    SELECT
        AddressKey  =   (SELECT AddressKey FROM Address WHERE Postcode = 'SL1 1AA' AND HouseNumber = 32)
    ,   FirstName   =   'Theresa'
    ,   LastName    =   'May'
    ,   DateofBirth =   '1956-10-01'
;

```