Max number of calculated fields in SQL editor?

Good day,
I faced an issue earlier today when I was adding new calculated fields in the SQL editor.
Basically I have a nested aggregation where I first find the max of a 1/0 flag, per patient, during a certain visit date range. Then I sum the flags and divide by the total # of patients in order to get a % 'pass'.
You know, medical KPI stuff.
It all works fine, I currently have 1 count distinct and 12 aggregations. Now I've added the 13th aggregation in the SQL editor. It runs without error, but that 13th field does not appear anywhere in the output window of the editor. Nor does it appear in the dashboard view.
Funny thing, if I comment out an existing aggregation, then that aggregation is absent and the 13th one does show.
Just wondering what I'm observing here. Did I reach some sort of limit on # of aggregations?
Please help.

Hi @chrisKH
Post "Diagnostic Info" from Admin > Troubleshooting, and which database type you're querying.

Ah, forgot about that, sorry. Pls see below.
I'm querying a SQL db (2016)

"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
"vendor": "Google Inc."
"system-info": {
"file.encoding": "Cp1252",
"": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.7+10",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": "",
"java.version": "11.0.7",
"": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.7+10",
"": "Windows Server 2012 R2",
"os.version": "6.3",
"user.language": "en",
"user.timezone": "Asia/Muscat"
"metabase-info": {
"databases": [
"hosting-env": "unknown",
"application-database": "mysql",
"application-database-details": {
"database": {
"name": "MySQL",
"version": "8.0.18"
"jdbc-driver": {
"name": "MariaDB Connector/J",
"version": "2.6.2"
"run-mode": "prod",
"version": {
"date": "2020-10-26",
"tag": "v0.37.0.2",
"branch": "release-x.37.x",
"hash": "ba7be09"
"settings": {
"report-timezone": "Asia/Muscat"

@chrisKH I would recommend trying a newer version. Latest is 0.39.1 - remember to backup first.
And post your query.

just a quick feedback,
I ran an upgrade, completed without any issues
still faced the same issue as before, however I tried rebuilding the Question from scratch and for some reason the rebuilt Question displays all columns fine,
so I will assume my initial Question had an error in it somewhere,
thanks anyway :+1: