Task: NL2SQL (source dataset: WikiSQL)

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.

Table:
| Name                       | Geographic code   | Type          |   Households |   Population (2004) |   Foreign population |   Moroccan population |
|:---------------------------|:------------------|:--------------|-------------:|--------------------:|---------------------:|----------------------:|
| azemmour                   | 181.01.01.        | municipality  |         8080 |               36722 |                   26 |                 36696 |
| el-jadida                  | 181.01.03.        | municipality  |        31602 |              144440 |                  384 |                144056 |
| lbir jdid                  | 181.01.05.        | municipality  |         3091 |               15267 |                   14 |                 15253 |
| sidi bennour               | 181.01.07.        | provincial    |         8000 |               39593 |                   16 |                 39577 |
| zemamra                    | 181.01.09.        | municipality  |         2336 |               11896 |                    1 |                 11895 |
| chtouka                    | 181.03.01.        | rural commune |         4541 |               28939 |                    3 |                 28936 |
| haouzia                    | 181.03.03.        | rural commune |         5989 |               34607 |                   14 |                 34593 |
| laghdira                   | 181.03.05.        | rural commune |         2630 |               16879 |                   12 |                 16867 |
| lamharza essahel           | 181.03.07.        | rural commune |         2766 |               15938 |                    0 |                 15938 |
| oulad rahmoune             | 181.03.09.        | rural commune |         3414 |               20239 |                    0 |                 20239 |
| sidi ali ben hamdouche     | 181.03.11.        | rural commune |         5158 |               28685 |                    7 |                 28678 |
| moulay abdallah            | 181.05.01.        | rural commune |         8909 |               45780 |                   28 |                 45752 |
| oulad aissa                | 181.05.03.        | rural commune |         3430 |               21779 |                    0 |                 21779 |
| oulad ghanem               | 181.05.05.        | rural commune |         3438 |               22342 |                    0 |                 22342 |
| oulad hcine                | 181.05.07.        | rural commune |         4626 |               27475 |                    0 |                 27475 |
| sidi abed                  | 181.05.09.        | rural commune |         3627 |               20854 |                    0 |                 20854 |
| sidi m'hamed akhdim        | 181.05.11.        | rural commune |         1680 |               10745 |                    0 |                 10745 |
| bni hilal                  | 181.07.01.        | rural commune |         2945 |               17288 |                    0 |                 17288 |
| bni tsiriss                | 181.07.03.        | rural commune |         2320 |               14955 |                    3 |                 14952 |
| bouhmame                   | 181.07.05.        | rural commune |         5268 |               30540 |                    0 |                 30540 |
| jabria                     | 181.07.07.        | rural commune |         2994 |               17654 |                    0 |                 17654 |
| khmis ksiba                | 181.07.09.        | rural commune |         1064 |                6637 |                    0 |                  6637 |
| koudiat bni dghough        | 181.07.11.        | rural commune |         2712 |               15506 |                    6 |                 15500 |
| kridid                     | 181.07.13.        | rural commune |         2023 |               12751 |                    0 |                 12751 |
| laagagcha                  | 181.07.15.        | rural commune |         2441 |               14313 |                    0 |                 14313 |
| laamria                    | 181.07.17.        | rural commune |         2105 |               13314 |                    6 |                 13308 |
| laaounate                  | 181.07.19.        | rural commune |         3188 |               18258 |                    2 |                 18256 |
| laatatra                   | 181.07.21.        | rural commune |         2633 |               15046 |                    1 |                 15045 |
| lmechrek                   | 181.07.23.        | rural commune |         2474 |               14853 |                    0 |                 14853 |
| metrane                    | 181.07.25.        | rural commune |         2020 |               11627 |                    0 |                 11627 |
| m'tal                      | 181.07.27.        | rural commune |         2074 |               11879 |                    1 |                 11878 |
| oulad amrane               | 181.07.29.        | rural commune |         2167 |               11866 |                    0 |                 11866 |
| oulad boussaken            | 181.07.31.        | rural commune |         1221 |                7641 |                    0 |                  7641 |
| oulad si bouhya            | 181.07.33.        | rural commune |         3120 |               18902 |                    0 |                 18902 |
| tamda                      | 181.07.35.        | rural commune |         1768 |                9701 |                    0 |                  9701 |
| boulaouane                 | 181.09.01.        | rural commune |         2319 |               14404 |                    0 |                 14404 |
| chaibate                   | 181.09.03.        | rural commune |         1738 |                9590 |                    1 |                  9589 |
| mettouh                    | 181.09.05.        | rural commune |         4228 |               25587 |                    1 |                 25586 |
| mogress                    | 181.09.07.        | rural commune |         2380 |               15050 |                    0 |                 15050 |
| oulad hamdane              | 181.09.09.        | rural commune |         2749 |               15205 |                    0 |                 15205 |
| oulad sidi ali ben youssef | 181.09.11.        | rural commune |         1783 |               10854 |                    1 |                 10853 |
| oulad frej                 | 181.09.13.        | rural commune |         3411 |               17047 |                    2 |                 17045 |
| sebt saiss                 | 181.09.15.        | rural commune |         1949 |               11212 |                    0 |                 11212 |
| si hsaien ben abderrahmane | 181.09.17.        | rural commune |         1155 |                6507 |                    0 |                  6507 |
| sidi smail                 | 181.09.19.        | rural commune |         4264 |               24569 |                    2 |                 24567 |
| zaouiat saiss              | 181.09.21.        | rural commune |         1526 |                9519 |                    0 |                  9519 |
| zaouiat lakouacem          | 181.09.23.        | rural commune |         2153 |               12726 |                    4 |                 12722 |
| laghnadra                  | 181.11.01.        | rural commune |         5300 |               32091 |                    0 |                 32091 |
| lgharbia                   | 181.11.03.        | rural commune |         3808 |               23074 |                    0 |                 23074 |
| loualidia                  | 181.11.05.        | rural commune |         2668 |               15433 |                   14 |                 15419 |
| oulad sbaita               | 181.11.07.        | rural commune |         3872 |               24967 |                    0 |                 24967 |
| saniat berguig             | 181.11.09.        | rural commune |         4924 |               30286 |                    0 |                 30286 |

Question: What is the largest foreign population when the 2004 population is 7641?

table_id: 2-12241356-2
label: SELECT MAX("Foreign population") FROM "table" WHERE "Population (2004)" = 7641