What is the way to calculate t1.c1/t2.c2 where t1 and t2 are two different tables in Vertical 8.0.x

I am new to Vertical. I have the above question. I would appreciate a reply in this regard. Thanks.

Answers

  • I mean the best way to perform division t1.c1/t2.c2. Here c1and c2are columns in tables t1 and t2 respectively.

  • swalkausswalkaus Vertica Employee Employee

    If you want the cartesian product of the two tables (unlikely) you can simply do:
    select t1.c1/t2.c2 from t1, t2;

    More likely you want to join the tables, perhaps using some identifier:
    select t1.c1/t2.c2 from t1 join t2 on t1.id =t2.id;

  • Thanks. It solved my problem. Also, I was using a join on both the tables.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file