I've two tables one with product_name and product_id(table1) and other one with product_id and sale_amount(table2).
I need to write a procedure in postgresql(version 14.4) which should have product id as parameter. So whenever required I call procedure with specific product_id and get output as product_id, product_name, sale_amount.
Kindly help me with this.
Thanks in advance