SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
WITH ssq_amount AS ( SELECT 699 + LEVEL AS amount FROM dual connect BY LEVEL <= 300 ) ,ssq_commision AS ( SELECT 0.01 * LEVEL AS comission FROM dual connect BY LEVEL <= 500 ) ,ssq_pre_data AS ( SELECT a.amount ,c.comission ,a.amount + a.amount * c.comission total_amount ,trim (a.amount + a.amount * c.comission) trimmed_total_amount -- Декартово произведение FROM ssq_amount a ,ssq_commision c ) select d.* from ssq_pre_data d

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear