Improve a database query for MySQL / MariaDB
Budget: ₹600 – ₹1,500 INR
Please ignore the budget mentioned in this job post. You can tell me the price of this SQL work when applying for the project.
I need a stored procedure to be improved.
In the attached file "data.zip", in this job post:
"soft_database.sql" has the database / tables
"stored_procedure.sql" has the stored procedure
"current_output.png" is the current output, and here: https://i.imgur.com/EKhHCFB.png
"expected_output.png" is the expected output, and here: https://i.imgur.com/rVcl1gH.png
"soft_database.sql" has 4 tables:
1. marketing_template_country
2. marketing_template_detail
3. marketing_template_type
4. marketing_user_template
In the stored procedure, I am selecting all values from table: "marketing_template_country"
The conditions are:
1. If the column: "id" of table: "marketing_template_country" (marketing_template_country.id) is present in table: "marketing_user_template" as column: "marketing_template_countryId" (marketing_user_template.marketing_template_countryId), then the result in stored procedure: column "assigned_to_user" (stored_procedure.assigned_to_user) is (1 / true) and value in column: "template" (stored_procedure.template) should be from marketing_user_template.template
2. If the column: "id" of table: "marketing_template_country" (marketing_template_country.id) is NOT present in table: "marketing_user_template" as column: "marketing_template_countryId" (marketing_user_template.marketing_template_countryId), then the result in stored procedure: column "assigned_to_user" (stored_procedure.assigned_to_user) is (0 / false) and value in column: "template" should be from marketing_template_country.template
3. If the column: marketing_template_country.template is NULL, then the result in stored procedure: column "template" should be from marketing_template_detail.template
4. The result in stored procedure: column "name" (stored_procedure.name) should be from marketing_template_detail.name
------------------------------------------------------------------------
Please answer these questions when applying for the job:
Have you seen the tables, stored procedure, the current output, and expected output in the attached file "data.zip"?
Do you understand what output is required based on current and expected images / screenshots?
Can you improve the SQL stored procedure? How much payment do you expect for this work?
Are you willing to work long-term with the team? If yes, how many minimum hours / week can you give in a month? You can give a rough estimate.
Are you willing to work for a SQL task based payment, instead of hourly work?
I need a stored procedure to be improved.
In the attached file "data.zip", in this job post:
"soft_database.sql" has the database / tables
"stored_procedure.sql" has the stored procedure
"current_output.png" is the current output, and here: https://i.imgur.com/EKhHCFB.png
"expected_output.png" is the expected output, and here: https://i.imgur.com/rVcl1gH.png
"soft_database.sql" has 4 tables:
1. marketing_template_country
2. marketing_template_detail
3. marketing_template_type
4. marketing_user_template
In the stored procedure, I am selecting all values from table: "marketing_template_country"
The conditions are:
1. If the column: "id" of table: "marketing_template_country" (marketing_template_country.id) is present in table: "marketing_user_template" as column: "marketing_template_countryId" (marketing_user_template.marketing_template_countryId), then the result in stored procedure: column "assigned_to_user" (stored_procedure.assigned_to_user) is (1 / true) and value in column: "template" (stored_procedure.template) should be from marketing_user_template.template
2. If the column: "id" of table: "marketing_template_country" (marketing_template_country.id) is NOT present in table: "marketing_user_template" as column: "marketing_template_countryId" (marketing_user_template.marketing_template_countryId), then the result in stored procedure: column "assigned_to_user" (stored_procedure.assigned_to_user) is (0 / false) and value in column: "template" should be from marketing_template_country.template
3. If the column: marketing_template_country.template is NULL, then the result in stored procedure: column "template" should be from marketing_template_detail.template
4. The result in stored procedure: column "name" (stored_procedure.name) should be from marketing_template_detail.name
------------------------------------------------------------------------
Please answer these questions when applying for the job:
Have you seen the tables, stored procedure, the current output, and expected output in the attached file "data.zip"?
Do you understand what output is required based on current and expected images / screenshots?
Can you improve the SQL stored procedure? How much payment do you expect for this work?
Are you willing to work long-term with the team? If yes, how many minimum hours / week can you give in a month? You can give a rough estimate.
Are you willing to work for a SQL task based payment, instead of hourly work?