Task: NL2SQL (source dataset: KaggleDBQA)

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:
Pesticide

Tables:

Table: sampledata15
|   sample_pk | state   |   year |   month |   day |   site | commod   | source_id   | variety       |   origin | country   | disttype   | commtype   | claim   | quantity   | growst   | packst   | distst   |
|------------:|:--------|-------:|--------:|------:|-------:|:---------|:------------|:--------------|---------:|:----------|:-----------|:-----------|:--------|:-----------|:---------|:---------|:---------|
|           1 | CA      |     15 |       1 |    20 |     10 | AP       |             | Fuji          |        1 |           | H          | FR         | NC      | 12         |          |          | WA       |
|           2 | CA      |     15 |       1 |    20 |     38 | AP       |             | Red Delicious |        1 |           | T          | FR         | NC      | 12         |          | WA       | WA       |
|           3 | CA      |     15 |       1 |    20 |     43 | AP       |             | Red Delicious |        1 |           | T          | FR         | NC      |            |          | WA       | WA       |
|           4 | CA      |     15 |       1 |    20 |    114 | AP       |             | Granny Smith  |        1 |           | H          | FR         | NC      | 17         |          | WA       | WA       |
|           5 | CA      |     15 |       1 |    20 |    149 | AP       |             | Fuji          |        1 |           | D          | FR         | PO      | 10         |          |          | CA       |
|           6 | CA      |     15 |       1 |    20 |    150 | AP       |             | Red Delicious |        1 |           | D          | FR         | NC      | 15         |          |          | WA       |
|           7 | CA      |     15 |       1 |    20 |    152 | AP       |             | N/A           |        1 |           | D          | FR         | NC      | 10         |          |          | WA       |
|           8 | CA      |     15 |       1 |    20 |    277 | AP       |             | Red Delicious |        1 |           | H          | FR         | NC      | 10         |          |          | WA       |
|           9 | CA      |     15 |       1 |    20 |    449 | AP       |             | Red Delicious |        1 |           | R          | FR         | NC      | 17         |          |          | WA       |
|          10 | CA      |     15 |       1 |    20 |    540 | AP       |             | Gala          |        1 |           | R          | FR         | PO      | 15         |          |          | WA       |


Table: resultsdata15
|   sample_pk | commod   | commtype   | lab   |   pestcode | testclass   | concen   |   lod | conunit   | confmethod   | confmethod2   | annotate   | quantitate   | mean   |   extract |   determin |
|------------:|:---------|:-----------|:------|-----------:|:------------|:---------|------:|:----------|:-------------|:--------------|:-----------|:-------------|:-------|----------:|-----------:|
|           2 | AP       | FR         | WA1   |        382 | E           |          | 0.015 | M         |              |               |            |              | ND     |       805 |         35 |
|           2 | AP       | FR         | WA1   |        387 | A           |          | 0.005 | M         |              |               |            |              | ND     |       805 |         35 |
|           2 | AP       | FR         | WA1   |        388 | A           |          | 0.005 | M         |              |               |            |              | ND     |       805 |         35 |
|           2 | AP       | FR         | WA1   |        512 | E           |          | 0.003 | M         |              |               |            |              | ND     |       805 |         52 |
|           2 | AP       | FR         | WA1   |        529 | A           |          | 0.01  | M         |              |               |            |              | ND     |       805 |         35 |
|           2 | AP       | FR         | WA1   |        536 | C           |          | 0.001 | M         |              |               |            |              | ND     |       805 |         52 |
|           2 | AP       | FR         | WA1   |        537 | E           |          | 0.003 | M         |              |               |            |              | ND     |       805 |         52 |
|           2 | AP       | FR         | WA1   |        540 | A           |          | 0.002 | M         |              |               |            |              | ND     |       805 |         35 |
|           2 | AP       | FR         | WA1   |        562 | C           |          | 0.001 | M         |              |               |            |              | ND     |       805 |         52 |
|           2 | AP       | FR         | WA1   |        593 | A           |          | 0.01  | M         |              |               |            |              | ND     |       805 |         35 |


Question: What's the mean result finding for product AP?

db_id: Pesticide
tables: name: sampledata15
data: sampledata15.csv
name: resultsdata15
data: resultsdata15.csv
label: SELECT mean FROM resultsdata15 WHERE commod = "AP"
sqlite_path: $MMTU_HOME/data_sqlite/KaggleDBQA/databases/Pesticide/Pesticide.sqlite