Консультация по рефакторингу SQL запросов
Если несколько запросов, они довольно сложные и имеют общую часть. В этой части идет создание временной таблицы на 230 полей, в процессе участвует примерно 20 джоинов. Этот процесс повторяется от запроса к запросу, он похож процентов на 70-80, но не идентичен. Например, каких-то джоинов может не быть, какое-то поле будет вычисляться по-другому и тд.
Можно ли как-то выделить это общую часть, например, в процедуру?
Запросы могу скинуть.
-
Можно. Общую часть запихать во вьюшку. А джойны делать уже к вьюшке
-
Если без параметров вьюха. А в фунцию можно любые параметры передавать и выдавать таблицу. С обееми потом уже делать джойны и что хош
-
Current freelance projects in the category Databases & SQL
Need a 1C specialist for refinements and development.I am looking for a 1C specialist for freelance collaboration. I am currently working with a contractor who provides support and maintenance for the 1C system. However, due to the contractor's workload, there is a need for prompt execution of additional tasks, improvements, and… Databases & SQL ∙ 10 hours 57 minutes back ∙ 9 proposals |
Restoring Instagram after a banOn March 3, 2026, my Instagram was blocked due to a violation of rules. I believe there has been some mistake, as the page was personal with photos and videos of my personal trips. I did not post any comments anywhere. I have sent several appeals. I cannot download my files… Databases & SQL, Web Programming ∙ 22 hours 3 minutes back ∙ 4 proposals |
It is necessary to upload products into the corresponding categories and subcategories from SQL files.The site is created on WP. It has a product catalog. Products were uploaded from a PDF file, resulting in a bit of a mess. There are three files with a clear distribution of categories, subcategories, and products in them. In the file PA.sql, categories are numbered, for… Databases & SQL, Web Programming ∙ 1 day 1 hour back ∙ 34 proposals |
CRM system for Railway LogisticsCreation of a CRM system for a logistics company mainly focused on rail and road transport, 1) Financial reporting 2) Processing applications 3) Contractors 4) Automatic issuance of invoices and acts upon closure, it is possible to create a simplified system based on 1C below… Databases & SQL, Client Management & CRM ∙ 1 day 10 hours back ∙ 38 proposals |
Eliminate the issue of incomplete data import from Excel files of Nova Poshta specifications into 1C:
45 USD
Goal: There is a processing in 1C for uploading the specifications of Nova Poshta. For unclear reasons, it has stopped loading some tabular data. We need to find the reason and eliminate the problem of incomplete data import from Excel files of Nova Poshta specifications into… System & Network Administration, Databases & SQL ∙ 4 days 5 hours back ∙ 16 proposals |