Question: I am a completely new programmer and I am trying to develop a website in php. All I want to do in this part of the code is to "read" the user's inputs and save them as session variables in order to do/ calculate something else in another subpage. In order to see if everything is working fine I added the lines `echo "Welcome ",$_SESSION["firstname"];` `echo "ok"` but it is not working. Can you help me? 
Here is my code: 

```
<!DOCTYPE html>
<html>
<body>
<form method="post" action="">
        <b>First Name:</b> <input name="firstname" type="text" value=""></br></br>
        <b>Last Name:</b>  <input name="lastname" type="text" value=""></br></br>
        <b>Age:</b> <input name="age" type="number" min="0" value=""></br></br>
        <b>Number of people in household:</b> <input name="numberofpeopleinhousehold" type="number" min="1"value=""></br></br>

        </br></br>
        <input type="submit" name="submit" value="Submit">
</form

<?php
session_start();
if (isset($_POST["submit"])){
$_SESSION["firstname"]= $_POST["firstname"];
$_SESSION["lastname"]= $_POST["lastname"];
$_SESSION["age"]= $_POST["age"];
$_SESSION["numberofpeopleinhousehold"]= $_POST["numberofpeopleinhousehold"];
}
echo "Welcome ".$_SESSION["firstname"];//here is....
echo "ok"
?>

</body>
</html>

```

Answer: 
This is a simple join and an aggregation based on the vendor\_id:

```
select v.vendor_id, 
       string_agg(ct.cuisine_type, ', ') as cuisine_type,
       string_agg(c.cuisine, ', ') as cuisine
from table_1 as v
   join table_2 as ct on v.vendor_id = ct.vendor_id
   join table_3 as c on ct.cuisine_type = c.cuisine_type
group by v.vendor_id;

```
Your table structure looks a bit strange. For instance, why does each cuisine type have only a single cuisine? Normally, I would expect the vendor to be connected to the cuisines, and then each cuisine to have a type.

However, that is not *this* question. With the data you have provided, you can use `string_agg()`:

```
select v.vendor_id, string_agg(cuisine_type, ', ') as cuisine_types,
       string_agg(cuisine, ', ') as cuisines
from table1 v left join
     table2 v2c
     on v.vendor_id = v2c.vendor_id left join
     table3 c
     on c.cuisine_type = v2c.cuisine_type
group by v.vendor_id;

```