Calculated field doesn't work - typo?

I’ve been going over the Base manual trying to find out why a simple calculated field isn’t working. I’ve been reluctant to ask here, as I’m sure the answer will be another embarrassing PEBKAC moment. What’s really puzzling me is why the calculated field in antoher query is working fine, while this one just returns “0”

SELECT "tdramas"."title",
       "tdramas"."eps watched",
       "tdramas"."eps total",
       ( "eps watched" / "eps total" ) * 100 AS "Percent Seen",
       "tdramas"."year 1st watched",
       "tdramas"."score"
FROM   "tdramas",
       "tcountries",
       "tstatus"
WHERE  "tdramas"."country" = "tcountries"."country-id"
       AND "tdramas"."status" = "tstatus"."status-id"
       AND "tstatus"."status" = 'dropped'
ORDER  BY "tdramas"."title" ASC,
          "tdramas"."score" DESC 

Here’s the query that is working

SELECT "tdramas"."title",
       "tcountries"."country",
       "tlanguages"."language",
       "tdramas"."score",
       "tdramas"."times watched",
       "tdramas"."eps total",
       "tdramas"."episode length",
       ( "eps watched" * "episode length" * "times watched" ) / 60 AS
       "View Time Total (Hrs)"
FROM   "tdramas",
       "tcountries",
       "tstatus",
       "tlanguages"
WHERE  "tdramas"."country" = "tcountries"."country-id"
       AND "tdramas"."status" = "tstatus"."status-id"
       AND "tdramas"."language" = "tlanguages"."lang-id"
       AND "tstatus"."status" = 'completed'
ORDER  BY "tdramas"."times watched" DESC 

Both of these were built in Design View in Base, but I’m in the process of prepping to build a new DB and want to write as much as possible in SQL Hence my interest infinding out if perhaps there’s simply a typo I missed

I’ve tried comparing the two calculation statements, but can’t grok why one works and the other doesn’t

I suspect that the fields “eps watched” and “eps total” are both of TYPE INTEGER.
.
an integer divided by an integer always returns an integer.
.
try this, the number of zeros after the decimal point dictates the precision:

100.00 * "eps watched" / "eps total" AS "Percent Seen",
1 Like

THANK YOU! Your suspicion was 100% correct, and this is exactly the kind of design flaw that I’m delighted to find now, before I start on my new database. MUCH obliged