Creating filter for custom sql

Hello, I have this sql query that creates buckets for the rent. I would like to filter these buckets so I can only show apartments that are in a specific bucket. I am having trouble creating the filter. I currently get this error even tho I added a number in the filter. I also tried adding "1500-2000" and it still won't work.

Hi @awilliams8

Post "Diagnostic Info" from Admin > Troubleshooting.

It seems like you might only be running selected parts of the query instead of the entire thing.
Then you are seeing this issue:
https://github.com/metabase/metabase/issues/16584 - upvote by clicking :+1: on the first post

If you are using Field Filters, then you cannot use table aliases:
https://www.metabase.com/learn/sql-questions/field-filters

But you probably just want a simple Number filter:
https://www.metabase.com/learn/sql-questions/sql-variables

I have tried a few things and looked at those links but they don't seem to work. Here is my diagnostic info:
{
"browser-info": {
"language": "en-US",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "1.8.0_282-heroku-b08",
"java.vendor": "Oracle Corporation",
"java.vendor.url": "http://java.oracle.com/",
"java.version": "1.8.0_282-heroku",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "25.282-b08",
"os.name": "Linux",
"os.version": "4.4.0-1095-aws",
"user.language": "en",
"user.timezone": "Etc/UTC"
},
"metabase-info": {
"databases": [
"googleanalytics",
"postgres"
],
"hosting-env": "heroku",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "13.4 (Ubuntu 13.4-1.pgdg20.04+1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.18"
}
},
"run-mode": "prod",
"version": {
"tag": "v0.38.3",
"date": "2021-04-01",
"branch": "release-x.38.x",
"hash": "8332830"
},
"settings": {
"report-timezone": "America/New_York"
}

@awilliams8 Metabase does not support multiple statements. I can see the beginning of a select * in the bottom of the editor.

Since I have no idea which filter type you are using or how your entire query looks like, then it's difficult to help you.

Latest release is 0.40.3.1 (in a couple of minutes): https://github.com/metabase/metabase/releases/latest

Hi, I understand that Metabase doesn't support multiple statements. The "select*" at the bottom is another query that I didn't include in my results. Here is what the results are supposed to look like and how I would want to filter the "buckets" column.

@awilliams8 Great, so you are not selecting parts of the query and running that?
You would do from listings where buckets={{bucket}} and select Number filter.