https://ruclips.ru/ru/watch/Oe_lSX1_aSk/creating-dynamic-sql-queries-using-custom-formulas