PSQL noob here. I'm trying to create a table similar to the following:
name foo bar baz foo_per_bar foo_bar_per_baz
joe 28 11 18 = foo/bar = foo_per_bar/baz
and thus far my schema looks like:
CREATE TABLE foobars (
id: serial primary key,
foo: Integer,
bar: Integer,
baz: Integer,
foo_per_bar: ??,
foo_bars_per_baz: ??
);
Is such a thing supported?
If not, how could I go about doing it? Create a separate table that performs the calculations and reference it in foobars
?