Cargo gives SQL query error after upgrading to 1.37.0 (which included updating Cargo), when using Special:RunQuery.
However, I do not believe the issue is only with 1.37. Based on the output, it is likely present on previous MediaWiki versions as well, as long as on latest Cargo.
After doing some debugging, the issue is caused by https://github.com/wikimedia/mediawiki-extensions-Cargo/commit/b68e912, which seems to use the wrong SQL. I was able to build some correct SQL which does properly return:
SELECT `anotacions_zk`.`_pageID` AS `cargo_backlink_page_id_anotacions_zk`,`_value` AS `_value` FROM `cargo__anotacions_zk__tags` GROUP BY `_value` ORDER BY `_value` LIMIT 100
SELECT `anotacions_zk`.`_pageID` AS `cargo_backlink_page_id_anotacions_zk`,`anotacions_zk__tags`.`_value` AS `_value` FROM `cargo__anotacions_zk__tags` AS `anotacions_zk__tags`, `cargo__anotacions_zk` AS `anotacions_zk` GROUP BY `_value` ORDER BY `_value` LIMIT 100;|