When models are referenced in SQL queries using {{#173}} syntax, they drop records from the original model leading to incorrect aggregates.
Here is my original model. If I create a question on top of it using question builder to get a simple count of all records in model, the count is returned as 1.7M. Screenshot below.
If I then reference that model (#173) in a SQL query and run the same aggregate count on that same model, I get a count of 1.04M. Screenshot below.
Any idea what might be happening here? There are no filters in place on this model. It is just a direct reference of a table in my DB.