have any SQL GROUP_CONCAT alternative function? - mysql

here i was past my sql query.
any body know GROUP_CONCAT alternative function so let me know ?
SQL Error :
<h1>A Database Error Occurred</h1>
<p>Error Number: 1140</p>
<p>In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'smartsaver.ud.id'; this is incompatible with sql_mode=only_full_group_by</p>
SQL Command :
SELECT ud.id, ud.url, d.document_name, d.d
GROUP_CONCAT(LEFT(REPLACE(url, "document", "thumb"), CHAR_LENGTH(REPLACE(url, "document", "thumb")) - LOCATE(".", REVERSE(REPLACE(url, "document", "thumb")))), ".", "png")
ud.document_url
END as new_url, CASE WHEN ud.type = 1 THEN "Image" WHEN ud.type = 2 THEN "Video" WHEN ud.type = 3 THEN "File" WHEN ud.type = 4 THEN "Text" ELSE "" END as type, d.added_on, ud.type as document_type
FROM tbl_uplaod_document ud
JOIN tbl_document d ON d.id = ud.document_id
LEFT OUTER JOIN tbl_document_project_relation pr
ON pr.document_id = ud.document_id
WHERE ud.is_active = 1
AND d.is_active = 1
AND ud.user_id = 1
AND ud.document_id = 116
LIMIT 10

#dev5 Your code to hard to read
Expression #1 of SELECT list is not in GROUP BY clause and contains non aggregated column 'smartsaver.ud.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by.
will be simply solved by changing the sql mode in MySQL by this command:
SET GLOBAL sql_mode=(SELECT REPLACE(##sql_mode,'ONLY_FULL_GROUP_BY',''));
Thank You :-)

You have a select with an aggregation function. That makes the query an aggregation function. But there is no group by. Happily, MySQL now generally returns an error in this case.
Earlier versions of MySQL allowed a malformed query such as your using the default settings. It would return values for the unaggregated columns from arbitrary rows. The default settings have changed to generate an error.
You should add a group by for all non-aggregated columns in the select:
group by ud.id, ud.url, d.document_name, d.d, . . .
Your code is rather hard to read, so it is hard to pick out the unaggregated columns.

Related

Rewrite the SQL in version 5.7

I have a following SQL which works in mysql version 5.6 but is breaking in mysql version 5.7.x.
SELECT * FROM (SELECT * FROM photos WHERE photoable_type = 'Mobilehome'
AND photoable_id IN (SELECT id FROM mobilehomes WHERE
mobilehomes.community_id = 1) AND photos.image_file_size IS NOT NULL
AND photos.is_published IS TRUE ORDER BY photos.priority ASC) AS tmp_table
GROUP BY photoable_id
It's throwing me following error:
Expression #1 of SELECT list is not in GROUP BY clause and contains
nonaggregated column 'tmp_table.id' which is not functionally
dependent on columns in GROUP BY clause; this is
incompatible with sql_mode=only_full_group_by
In this case or you change the sql mode for instrcut the db to work as mysql 5.6 version or you can adeguate your query to the new behavior
In this second case
If you use group by whithout aggregation function this mean that for all the column different from photoable_id you accept casual result
This mean that you could, probably, also accepted an aggregated result based greagtion function eg: on min() or max ()
assuming your tables containg col1, col2, .. the you must declare explicitally the column you need
SELECT photos.photoable_id, min(col1), min(col2),....
FROM photos
INNER JOIN mobilehomes ON mobilehomes.community_id = 1
AND photos.photoable_type = 'Mobilehome'
AND photos.photoable_id = mobilehomes.id
AND photos.image_file_size IS NOT NULL
AND photos.is_published IS TRUE
GROUP BY photos.photoable_id
ORDER BY photos.priority ASC
Looking to your code seems also that you could avoid the subquery

mysql error "ERROR 3029 (HY000): Expression #1 of ORDER BY contains aggregate function and applies to the result of a non-aggregated query"

I am executing the below query
SELECT DISTINCT n.nid AS entity_id
FROM node n
INNER JOIN og_membership om ON n.nid=om.etid AND om.entity_type='node'
INNER JOIN foster_animal_capacity fc ON n.nid=fc.person_id
LEFT OUTER JOIN field_data_field_attributes fa ON n.nid=fa.entity_id
LEFT OUTER JOIN foster_person_black_outs fb ON n.nid=fb.person_id
WHERE -- n.nid = 1441663 AND
(om.gid = 464) AND (fc.animal_type_id = 3)
AND ((fc.capacity - fc.occupied)>=1)
AND ((fb.start_date IS NULL) OR (fb.end_date < 1523577600) OR (fb.start_date > 1522540800))
AND ((SELECT pid FROM `animal_history` WHERE `TYPE` = 'Foster Return'
AND pid = n.nid ORDER BY DATE_FORMAT(FROM_UNIXTIME( UNIX_TIMESTAMP( ) - MAX( CAST(`time` AS UNSIGNED) ) ) ,'%e')));
The query executing perfectly in MySql 5.5.5
But showing the below error in MySql 5.7.21
ERROR 3029 (HY000): Expression #1 of ORDER BY contains aggregate function and applies to the result of a non-aggregated query
Why is this happening? And how can I overcome this issue?
I am not able to find any documentation for the error code 3029
As mentioned in MySQL documention :
MySQL 5.7.5 and up implements detection of functional dependence. If the ONLY_FULL_GROUP_BY SQL mode is enabled (which it is by default), MySQL rejects queries for which the select list, HAVING condition, or ORDER BY list refer to nonaggregated columns that are neither named in the GROUP BY clause nor are functionally dependent on them. (Before 5.7.5, MySQL does not detect functional dependency and ONLY_FULL_GROUP_BY is not enabled by default. For a description of pre-5.7.5 behavior, see the MySQL 5.6
For detail please check:
MySQL Handling of GROUP BY

Prestashop - List view filter

I insert an other column in the list view of my module inserting the values with getList function, I modified the sql to filter in the renderList function but I can't use the alias in where clause.
How can I fix it?
The error i got is the next:
Uncaught Unknown column 'product_supplier_name' in 'where clause'<br /><br />
SELECT SQL_CALC_FOUND_ROWS a.* , s.name AS product_supplier_name FROM ps_supplier_bill a LEFT JOIN ps_supplier s ON s.id_supplier = a.id_product_supplier WHERE 1 AND product_supplier_name LIKE '%fa%' ORDER BY product_supplier_name asc LIMIT 0,50
The proper query should be this:
SELECT SQL_CALC_FOUND_ROWS a.* , s.`name` AS product_supplier_name FROM `ps_supplier_bill` a LEFT JOIN `ps_supplier` s ON s.`id_supplier` = a.`id_product_supplier` WHERE 1 AND s.`name` LIKE '%fa%' ORDER BY s.`name` asc LIMIT 0,50
It's not possible use directly an alias in WHERE, because chronologically, WHERE happens before SELECT, which always is the last step in the execution chain. REFER
From MySQL doc:
Standard SQL disallows references to column aliases in a WHERE clause. This restriction is imposed because when the WHERE clause is evaluated, the column value may not yet have been determined.
MySQL doc

MySQL. Queries. Unknown column [duplicate]

This question already has answers here:
Unknown Column In Where Clause
(16 answers)
Closed 8 years ago.
I have this following query and I want to display the results where masini > 2 but when I run the query it says that 'masini' is not an existing column but it's the name of a custom column I defined on the first row. I am new to MySQL.. can anyone point me in the right direction?
This is my query:
SELECT pers.serie_buletin AS persoana, COUNT(prop.serie_buletin) AS masini
FROM persoana pers
JOIN proprietate prop
ON pers.id_persoana = prop.serie_buletin
WHERE masini > 2
GROUP BY persoana ;
I defined the column on this line, in this part "COUNT(prop.serie_buletin) AS masini" but it says "Error Code: 1054. Unknown column 'masini' in 'where clause'". What am I missing?
Change WHERE to HAVING.
GROUP BY persoana
HAVING masini > 2;
The MySQL HAVING clause is used in the SELECT statement to specify
filter conditions for group of rows or aggregates.
The MySQL HAVING clause is often used with the GROUP BY clause. When
using with the GROUP BY clause, you can apply a filter condition to
the columns that appear in the GROUP BY clause. If the GROUP BY clause
is omitted, the MySQL HAVING clause behaves like the WHERE clause.
Notice that the MySQL HAVING clause applies the condition to each
group of rows, while the WHERE clause applies the condition to each
individual row.
source
The where clause is evaluated first, so MySQL don't know what is masini there. Here are some similar questions.
Getting unknown column error when using 'as' in mysql statement
Unknown Column In Where Clause
As explained in the questions above and another answers here, you can only use alias from sub-queries, or in clauses that are evaluated after the alias is assigned as ORDER BY, GROUP BY or HAVING, in your case you can use the having clause.
SELECT pers.serie_buletin AS persoana,
COUNT(prop.serie_buletin) AS masini
FROM persoana pers
JOIN proprietate prop
ON pers.id_persoana = prop.serie_buletin
GROUP BY pers.serie_buletin
HAVING COUNT(prop.serie_buletin) > 2;
You can't put column aliases in the where clause. Ever.
In this case, though, you actually need a having clause:
SELECT pers.serie_buletin AS persoana, COUNT(prop.serie_buletin) AS masini
FROM persoana pers
JOIN proprietate prop
ON pers.id_persoana = prop.serie_buletin
GROUP BY persoana
HAVING masini > 2;

Ambiguous column in where clause with qualified identifier

I get the following error:
ERROR 1052 (23000) at line 1: Column 'id' in where clause is ambiguous
Database: MySQL 5.5.30 (with all tables & columns in the schema)
SELECT cam.id, cam.name AS campaign_name, cam.subdomain, usr.id AS user_id, usr.email, usr.display_name AS user_display_name
FROM campaigns AS cam
INNER JOIN users AS usr
ON usr.id = cam.user_id
WHERE cam.state=2
AND (usr.email = "hello#me.com")
AND cam.id IN (105793,107290,106048,107107,15097,108580,107394,107560,108942,107670,107925,107056,106089,30931,106864,45868,107625,106878,106417,88858,106065,106758,3282,103372,4449,108440,107311,106239,105857,110712,110243,105939,107001,105950,107124,105882,106139,107548,432,107466,105942,107115,51342,106437,106482,107192,105867,106993,107667,103769,108745,49924,105763,105935,99140,107402,20637,21155,105788,89963,106421,70124,12304,4748,107015,109758,103145,107590,106968,110692,26533,24993,33660,107398,34584,49597,107518,108878,107036,107668,105410,107060,106135,29205,106026,79254,19132,108692,107572,106978,93445,105678,107386,105866,106449,112104,id,312012,308555,323625,314793,321195,310245,291101,306016,179787,308224,290484,318154,318116,70226,313982,311419,71197,320725,271482,317257,331048,316765,75626,76321,329973,314034,313681,313850,306487,317443,83760,314759,339990,323732,306470,330480,89979,304814,91365,92541,316037,315131,116866,315323,111116,316067,316164,197902,129172,319690,141828,313517,315838,317608,310268,315096,309004,290518,319317,316349,316365,336052,183055,321936,318115,316950,330521,331975,324045,315540,201025,315770,321558,317962,200887,317500,328721,320403,311716,315812,318661,344680,315843,317483,317588,258656,317936,329850,245554,344785,314865,316722,329550,314332,316360,291604,341029,261118,264395,335387,330797,315403,276508,275586,275717,281996,276689,276709,290611,276957,277804,278480,279042,279381,344612,317507,280753,329926,281838,304604,311660,287452,317401,292158,305459,287031,312338,330015,295562,343920,289372,289377,328036,313204,322422,289641,289457,289486,291896,289453,298416,316894,289474,289476,289491,289566,289586,289599,289672,289677,328909,293962,289720,289754,289745,289774,293484,330235,289898,303233,290083,290120,290242,290327,290359,290399,290438,290475,290555,290628,290872,291214,291418,291333,291652,291779,313939,292236,292340,314508,293046,293376,293185,342259,293263,293515,293600,294511,295262,293957,294073,317855,294397,311490,294691,298226,294861,295088,295145,302131,313369,296434,315662,310084,322252,297288,297360,297432,298203,298794,299262,333157,305860,304484,304422,304462,304649,327116,304487,304504,318641,304528,304574,312829,304617,304668,304632,304924,304658,318170,304651,304762,304771,304770,304806,305019,304831,305281,304892,304941,304990,305008,305040,305041,337272,305048,305107,305126,309925,305195,305256,305284,305334,305294,305327,305342,305405,305521,306679,305520,305546,305595,305650,305659,305732,305712,305779,305798,305819,305838,305873,319122,307946,305937,310949,306243,306112,306113,306120,306140,306142,322700,306197,307466,306263,313766,318790,306303,306344,306346,306374,306407,306406,306415,306445,306465,306486,306510,309524,341418,306687,309657,306759,308941,306751,306779,306756,306778,307202,308147,329657,330603,306859,320503,306849,306870,331402,306863,306928,306880,306894,306906,306918,306936,307479,306962,306970,306968,306982,306986,307001,307005,307008,309223,307007,307011,307061,307062,307092,308177,332228,307478,307127,328246,307161,337299,330104,307791,307412,307424,328480,307430,307447,307454,307473,307480,307512,307493,314340,307542,307526,307527,307545,307589,307623,336402,307652,307659,333206,307666,319975,307674,313887,310200,307713,307761,307771,309273,307817,307823,310259,307878,307889,312913,307976,308013,308021,308120,308174,308182,319795,308272,308290,333845,324412,308441,308450,308468,308479,308566,308525,308544,308561,308598,308616,308617,318255,308648,308651,308657,308663,308668,308671,335094,308680,311769,308872,334045,308717,308739,308788,308804,312547,308819,308827,308911,308904,309543,309015,309021,309052,309220,309079,309099,309163,309179,327520,309243,309236,314363,309263,309279,309285,309314,309364,309406,309457,309478,309495,309552,309952,309588,309613,309636,309638,309650,313116,310919,309734,314296,309811,309849,309882,325089,310459,338535,309931,309940,310023,310002,310007,310030,310032,318779,310081,310118,319304,310120,325833,310144,310145,310151,310204,310210,310278,329000,322690,310323,310383,317187,310442,310447,310451,310461,310488,311128,310545,310567,310566,310575,310597,310600,311042,310636,310661,310659,310666,310680,310707,310691,310709,310720,310722,310723,310725,314488,310736,310754,310762,310763,320101,310796,310894,310947,310953,312134,311039,311257,311200,311139,311152,311156,311164,311215,311218,311233,314467,311307,311313,311322,311333,311358,311379,311446,311448,315437,311530,311550,311570,311637,311638,311683,311702,311663,311699,311712,311739,311752,311808,311822,311826,342130,311881,311898,311907,325253,312032,312047,312050,312078,312098,313206,312165,312170,312188,312240,312241,312257,316515,312261,312302,312756,312340,312388,312459,322362,312453,312492,312501,312512,312568,312521,312543,314688,312584,312588,325194,312597,330651,312712,312821,312768,312809,325199,312857,312866,312871,312887,312891,312892,312906,312919,312928,312952,342782,312951,312968,312966,313020,313028,313057,313058,313062,313064,313071,327699,313471,313123,313193,324221,313270,313298,313300,313321,313354,313401,313408,314164,313479,344095,313554,314879,313582,313579,314849,313619,313620,313647,313674,313697,313715,313718,313721,313725,315051,313776,318773,313811,313857,333559,313843,313883,313920,313936,313974,320242,314247,315426,314032,314082,314085,314108,314112,314141,315142,314173,314229,314243,314664,314359,314365,314372,314400,314376,314395,314466,314468,314476,315731,314491,314492,316501,314875,314551,314562,314589,314614,314629,314651,314675,314652,314656,314751,315509,314770,314771,314834,314806,314860,314874,314916,315030,314923,314975,315021,315018,315019,315037,320761,337287,315047,315063,315139,315087,315102,315122,326907,315194,315200,315224,315232,315239,315252,315258,315318,315347,315357,315380,315388,338468,315395,315414,315420,316572,315441,335308,315453,315486,315488,317629,315565,315664,315686,315691,315707,315775,317867,315829,318320,315895,316394,315899,316178,315902,326518,316286,316030,316012,326614,316047,316062,316078,316128,316633,316151,316182,316189,319659,316822,316231,316238,316256,316267,321759,316282,317917,316372,316379,316402,316428,328069,316775,316457,316490,316467,316543,316586,316602,316616,316617,316646,320300,316685,316965,316739,328530,316790,316795,327353,316823,321203,316841,339982,330937,317245,316860,316881,316887,316892,316925,325234,342990,320909,331646,330988,320580,327576,317465,317054,323357,317149,317201,317239,317235,317243,319624,317355,317290,318297,317294,322359,320591,319131,317360,317410,317674,317533,317482,332117,317522,317556,317590,317613,317643,317673,319865,324529,317801,317866,323277,318733,317905,317909,318010,318056,318223,318146,318196,318208,318245,318262,318858,320332,322855,335628,321932,323584,325517,327285,326636,329112,327394,329130,328687,328625)
ORDER BY cam.id ASC
When I strip the "AND cam.id IN ()" part, it executes.
Why does this happen, although I have fully qualified the column (i.e. "cam.id" instead of "id")?
Things I tried:
removing the "AND cam.id" clause --> statement executes without error
using "campaigns.id" instead of "cam.id" --> error 1054 / "unknown column in where clause"
UPDATE it works, if I have only a few (say 5) items in the IN clause
I think that the root of the problem is in the following line:
AND cam.id IN (105793,107290,106048,107107,15097,108580,107394,107560,108942,107670,107925,107056,106089,30931,106864,45868,107625,106878,106417,88858,106065,106758,3282,103372,4449,108440,107311,106239,105857,110712,110243,105939,107001,105950,107124,105882,106139,107548,432,107466,105942,107115,51342,106437,106482,107192,105867,106993,107667,103769,108745,49924,105763,105935,99140,107402,20637,21155,105788,89963,106421,70124,12304,4748,107015,109758,103145,107590,106968,110692,26533,24993,33660,107398,34584,49597,107518,108878,107036,107668,105410,107060,106135,29205,106026,79254,19132,108692,107572,106978,93445,105678,107386,105866,106449,112104,id,312012,308555,323625,314793,321195,310245,291101,306016,179787,308224,290484,318154,318116,70226,313982,311419,71197,320725,271482,317257,331048,316765,75626,76321,329973,314034,313681,313850,306487,317443,83760,314759,339990,323732,306470,330480,89979,304814,91365,92541,316037,315131,116866,315323,111116,316067,316164,197902,129172,319690,141828,313517,315838,317608,310268,315096,309004,290518,319317,316349,316365,336052,183055,321936,318115,316950,330521,331975,324045,315540,201025,315770,321558,317962,200887,317500,328721,320403,311716,315812,318661,344680,315843,317483,317588,258656,317936,329850,245554,344785,314865,316722,329550,314332,316360,291604,341029,261118,264395,335387,330797,315403,276508,275586,275717,281996,276689,276709,290611,276957,277804,278480,279042,279381,344612,317507,280753,329926,281838,304604,311660,287452,317401,292158,305459,287031,312338,330015,295562,343920,289372,289377,328036,313204,322422,289641,289457,289486,291896,289453,298416,316894,289474,289476,289491,289566,289586,289599,289672,289677,328909,293962,289720,289754,289745,289774,293484,330235,289898,303233,290083,290120,290242,290327,290359,290399,290438,290475,290555,290628,290872,291214,291418,291333,291652,291779,313939,292236,292340,314508,293046,293376,293185,342259,293263,293515,293600,294511,295262,293957,294073,317855,294397,311490,294691,298226,294861,295088,295145,302131,313369,296434,315662,310084,322252,297288,297360,297432,298203,298794,299262,333157,305860,304484,304422,304462,304649,327116,304487,304504,318641,304528,304574,312829,304617,304668,304632,304924,304658,318170,304651,304762,304771,304770,304806,305019,304831,305281,304892,304941,304990,305008,305040,305041,337272,305048,305107,305126,309925,305195,305256,305284,305334,305294,305327,305342,305405,305521,306679,305520,305546,305595,305650,305659,305732,305712,305779,305798,305819,305838,305873,319122,307946,305937,310949,306243,306112,306113,306120,306140,306142,322700,306197,307466,306263,313766,318790,306303,306344,306346,306374,306407,306406,306415,306445,306465,306486,306510,309524,341418,306687,309657,306759,308941,306751,306779,306756,306778,307202,308147,329657,330603,306859,320503,306849,306870,331402,306863,306928,306880,306894,306906,306918,306936,307479,306962,306970,306968,306982,306986,307001,307005,307008,309223,307007,307011,307061,307062,307092,308177,332228,307478,307127,328246,307161,337299,330104,307791,307412,307424,328480,307430,307447,307454,307473,307480,307512,307493,314340,307542,307526,307527,307545,307589,307623,336402,307652,307659,333206,307666,319975,307674,313887,310200,307713,307761,307771,309273,307817,307823,310259,307878,307889,312913,307976,308013,308021,308120,308174,308182,319795,308272,308290,333845,324412,308441,308450,308468,308479,308566,308525,308544,308561,308598,308616,308617,318255,308648,308651,308657,308663,308668,308671,335094,308680,311769,308872,334045,308717,308739,308788,308804,312547,308819,308827,308911,308904,309543,309015,309021,309052,309220,309079,309099,309163,309179,327520,309243,309236,314363,309263,309279,309285,309314,309364,309406,309457,309478,309495,309552,309952,309588,309613,309636,309638,309650,313116,310919,309734,314296,309811,309849,309882,325089,310459,338535,309931,309940,310023,310002,310007,310030,310032,318779,310081,310118,319304,310120,325833,310144,310145,310151,310204,310210,310278,329000,322690,310323,310383,317187,310442,310447,310451,310461,310488,311128,310545,310567,310566,310575,310597,310600,311042,310636,310661,310659,310666,310680,310707,310691,310709,310720,310722,310723,310725,314488,310736,310754,310762,310763,320101,310796,310894,310947,310953,312134,311039,311257,311200,311139,311152,311156,311164,311215,311218,311233,314467,311307,311313,311322,311333,311358,311379,311446,311448,315437,311530,311550,311570,311637,311638,311683,311702,311663,311699,311712,311739,311752,311808,311822,311826,342130,311881,311898,311907,325253,312032,312047,312050,312078,312098,313206,312165,312170,312188,312240,312241,312257,316515,312261,312302,312756,312340,312388,312459,322362,312453,312492,312501,312512,312568,312521,312543,314688,312584,312588,325194,312597,330651,312712,312821,312768,312809,325199,312857,312866,312871,312887,312891,312892,312906,312919,312928,312952,342782,312951,312968,312966,313020,313028,313057,313058,313062,313064,313071,327699,313471,313123,313193,324221,313270,313298,313300,313321,313354,313401,313408,314164,313479,344095,313554,314879,313582,313579,314849,313619,313620,313647,313674,313697,313715,313718,313721,313725,315051,313776,318773,313811,313857,333559,313843,313883,313920,313936,313974,320242,314247,315426,314032,314082,314085,314108,314112,314141,315142,314173,314229,314243,314664,314359,314365,314372,314400,314376,314395,314466,314468,314476,315731,314491,314492,316501,314875,314551,314562,314589,314614,314629,314651,314675,314652,314656,314751,315509,314770,314771,314834,314806,314860,314874,314916,315030,314923,314975,315021,315018,315019,315037,320761,337287,315047,315063,315139,315087,315102,315122,326907,315194,315200,315224,315232,315239,315252,315258,315318,315347,315357,315380,315388,338468,315395,315414,315420,316572,315441,335308,315453,315486,315488,317629,315565,315664,315686,315691,315707,315775,317867,315829,318320,315895,316394,315899,316178,315902,326518,316286,316030,316012,326614,316047,316062,316078,316128,316633,316151,316182,316189,319659,316822,316231,316238,316256,316267,321759,316282,317917,316372,316379,316402,316428,328069,316775,316457,316490,316467,316543,316586,316602,316616,316617,316646,320300,316685,316965,316739,328530,316790,316795,327353,316823,321203,316841,339982,330937,317245,316860,316881,316887,316892,316925,325234,342990,320909,331646,330988,320580,327576,317465,317054,323357,317149,317201,317239,317235,317243,319624,317355,317290,318297,317294,322359,320591,319131,317360,317410,317674,317533,317482,332117,317522,317556,317590,317613,317643,317673,319865,324529,317801,317866,323277,318733,317905,317909,318010,318056,318223,318146,318196,318208,318245,318262,318858,320332,322855,335628,321932,323584,325517,327285,326636,329112,327394,329130,328687,328625)
if you'll look carefully you'll see that inside this huge list you accidentally entered "id" as one of the items.
your in list includes an identifier
...,112104,id,312012,...
^^-------------------- ???