title: Works on MySQL Workbench, but not on Python? two identical codes. But other value
body: <p>this select works in Workbench and Python:</p>
  <pre><code>#!/usr/bin/python3
  import mysql.connector
  
  mydb = mysql.connector.connect(
    host=&quot;127.0.0.1&quot;,
    user=&quot;root&quot;,
    password=&quot;xxxxxxxx&quot;,
    database=&quot;gnucash&quot;
  )
  
  sqlcursor = mydb.cursor()
  sqlcursor.execute(&quot;&quot;&quot;
  SELECT  MAX(transactions.num) AS nr , MAX(transactions.enter_date) AS enter, MAX(transactions.post_date) AS post, MAX(transactions.description) AS &quot;beschr&quot;, SUM(splits.value_num) AS &quot;Euro&quot;
  FROM gnucash.splits
  INNER JOIN gnucash.transactions ON gnucash.splits.tx_guid = gnucash.transactions.guid
  INNER JOIN gnucash.accounts ON gnucash.splits.account_guid = gnucash.accounts.guid
  WHERE transactions.guid IN (
      SELECT transactions.guid FROM gnucash.splits
      INNER JOIN gnucash.transactions ON gnucash.splits.tx_guid = gnucash.transactions.guid
      INNER JOIN gnucash.accounts ON gnucash.splits.account_guid = gnucash.accounts.guid
      WHERE accounts.guid LIKE &quot;f2dd1f1e92cf41f687187d1e73fbc2c9&quot;)
  AND accounts.guid NOT LIKE &quot;f2dd1f1e92cf41f687187d1e73fbc2c9&quot;
  GROUP BY transactions.enter_date
  ORDER BY post DESC, nr DESC, enter DESC
  LIMIT 30;
  &quot;&quot;&quot;)
  
  rohumsaetze = sqlcursor.fetchall()
  
  print(rohumsaetze)
  </code></pre>
  <p>this select works on Workbench, <strong>but not</strong> in Python???</p>
  <pre><code>SELECT  MAX(transactions.num) AS nr , MAX(transactions.enter_date) AS enter, MAX(transactions.post_date) AS post, MAX(transactions.description) AS &quot;beschr&quot;, SUM(splits.value_num) AS &quot;Euro&quot;
  FROM gnucash.splits
  INNER JOIN gnucash.transactions ON gnucash.splits.tx_guid = gnucash.transactions.guid
  INNER JOIN gnucash.accounts ON gnucash.splits.account_guid = gnucash.accounts.guid
  WHERE transactions.guid IN (
      SELECT transactions.guid FROM gnucash.splits
      INNER JOIN gnucash.transactions ON gnucash.splits.tx_guid = gnucash.transactions.guid
      INNER JOIN gnucash.accounts ON gnucash.splits.account_guid = gnucash.accounts.guid
      WHERE accounts.guid LIKE &quot;1df66c60180c4f3cb5cc080c1e7d4834&quot;)
  AND accounts.guid NOT LIKE &quot;1df66c60180c4f3cb5cc080c1e7d4834&quot;
  GROUP BY transactions.enter_date
  ORDER BY post DESC, nr DESC, enter DESC
  LIMIT 30;
  </code></pre>
  <p>only the &quot;%Sparda%&quot; and &quot;%Commerz%&quot; is the different. On Workbench works fine but i needed python. I have try to make the Statement with root, how <a href="https://stackoverflow.com/questions/53751358/stored-procedure-works-on-mysql-workbench-but-not-in-python">here</a>. But without success. And above all there is no error. How to find the error? Find the error?</p>
  <p>I have already rewritten the code 3 times. Maybe someone has an idea how to write it differently? That it works.</p>
  <p>thanks to you</p>