Task: NL2SQL (source dataset: Archer)

Natural language to SQL, also known as NL2SQL, is the problem of generating a SQL query that can be executed on a input table, for a given natural language question.

You will be given an input table called "table" in the markdown format, as well as a question. Your task is to generate an SQL query that can be executed on the input table to answer the question.

Please ensure that the generated SQL only return relevant columns being specifically asked in the question (e.g., in SQL please don't return more than one columns in SELECT if only one column is needed to answer the given question, and similarly please refrain from using SELECT * unless the entire row is needed to answer the question).
 
When generating SQL code, please use the SQLite syntax to ensure that your SQL is executable on SQLite3. Use only columns that are present in the table, always use quotes around your column and table names (some column names have punctuation or special characters), and refer to the columns using the column-names exactly as they appear in the table, do not add or remove punctuation (underscore, slash, etc.)

No explanation, return the code only with the following markdown codeblock format : ```sql<SQL CODE>```. For example, ```sql
SELECT * FROM "table"
``` is a valid format.

Database:
concert_singer

Tables:

Table: stadium
|   Stadium_ID | Location        | Name              |   Capacity |   Highest |   Lowest |   Average |
|-------------:|:----------------|:------------------|-----------:|----------:|---------:|----------:|
|            1 | Raith Rovers    | Stark's Park      |      10104 |      4812 |     1294 |      2106 |
|            2 | Ayr United      | Somerset Park     |      11998 |      2363 |     1057 |      1477 |
|            3 | East Fife       | Bayview Stadium   |       2000 |      1980 |      533 |       864 |
|            4 | Queen's Park    | Hampden Park      |      52500 |      1763 |      466 |       730 |
|            5 | Stirling Albion | Forthbank Stadium |       3808 |      1125 |      404 |       642 |
|            6 | Arbroath        | Gayfield Park     |       4125 |       921 |      411 |       638 |
|            7 | Alloa Athletic  | Recreation Park   |       3100 |      1057 |      331 |       637 |
|            9 | Peterhead       | Balmoor           |       4000 |       837 |      400 |       615 |
|           10 | Brechin City    | Glebe Park        |       3960 |       780 |      315 |       552 |


Table: singer
|   Singer_ID | Name         | Country       | Song_Name   |   Song_release_year |   Age | Is_male   |
|------------:|:-------------|:--------------|:------------|--------------------:|------:|:----------|
|           1 | Joe Sharp    | Netherlands   | You         |                1992 |    52 | F         |
|           2 | Timbaland    | United States | Dangerous   |                2008 |    32 | T         |
|           3 | Justin Brown | France        | Hey Oh      |                2013 |    29 | T         |
|           4 | Rose White   | France        | Sun         |                2003 |    41 | F         |
|           5 | John Nizinik | France        | Gentleman   |                2014 |    43 | T         |
|           6 | Tribal King  | France        | Love        |                2016 |    25 | T         |


Table: concert
|   concert_ID | concert_Name   | Theme           |   Stadium_ID |   Year |
|-------------:|:---------------|:----------------|-------------:|-------:|
|            1 | Auditions      | Free choice     |            1 |   2014 |
|            2 | Super bootcamp | Free choice 2   |            2 |   2014 |
|            3 | Home Visits    | Bleeding Love   |            2 |   2015 |
|            4 | Week 1         | Wide Awake      |           10 |   2014 |
|            5 | Week 1         | Happy Tonight   |            9 |   2015 |
|            6 | Week 2         | Party All Night |            7 |   2015 |


Table: singer_in_concert
|   concert_ID |   Singer_ID |
|-------------:|------------:|
|            1 |           2 |
|            1 |           3 |
|            1 |           5 |
|            2 |           3 |
|            2 |           6 |
|            3 |           5 |
|            4 |           4 |
|            5 |           6 |
|            5 |           3 |
|            6 |           2 |


Question: Singers born before 1980 earn $355 per concert, while singers born after 1980 earn $228 per concert. If Justin Brown is 3 years older than John Nizinik, how much was spent on paying the singers for the concerts held in Somerset Park stadium?

db_id: concert_singer
tables: name: stadium
data: stadium.csv
name: singer
data: singer.csv
name: concert
data: concert.csv
name: singer_in_concert
data: singer_in_concert.csv
label: SELECT p1 + p2 AS cost FROM ( SELECT 355 * ( COUNT ( * ) ) AS p1 FROM concert A JOIN singer_in_concert B ON A.concert_ID = B.concert_ID JOIN ( SELECT Singer_ID , Name , strftime ( "%Y" , "now" ) - Age AS birth_year FROM singer WHERE Name != "Justin Brown" UNION ALL SELECT Singer_ID , Name , ( SELECT strftime ( "%Y" , "now" ) - Age FROM singer WHERE Name = "John Nizinik" ) - 3 AS birth_year FROM singer WHERE Name = "Justin Brown" ) C ON B.Singer_ID = C.Singer_ID JOIN stadium D ON A.Stadium_ID = D.Stadium_ID WHERE D.Name = "Somerset Park" AND C.birth_year < 1980 ) JOIN ( SELECT 228 * ( COUNT ( * ) ) AS p2 FROM concert A JOIN singer_in_concert B ON A.concert_ID = B.concert_ID JOIN ( SELECT Singer_ID , Name , strftime ( "%Y" , "now" ) - Age AS birth_year FROM singer WHERE Name != "Justin Brown" UNION ALL SELECT Singer_ID , Name , ( SELECT strftime ( "%Y" , "now" ) - Age FROM singer WHERE Name = "John Nizinik" ) - 3 AS birth_year FROM singer WHERE Name = "Justin Brown" ) C ON B.Singer_ID = C.Singer_ID JOIN stadium D ON A.Stadium_ID = D.Stadium_ID WHERE D.Name = "Somerset Park" AND C.birth_year >= 1980 )
commonsense_knowledge: Age is calculated by substracting date of birth from a given date.
sqlite_path: $MMTU_HOME/data_sqlite/Archer/databases/concert_singer/concert_singer.sqlite