How to create your own SQL Coding Questions to the Library

Overview

In this guide, we’ll walk through the steps to add custom SQL coding questions to your Xobin dashboard’s question library. By following these instructions, you can create and configure SQL instances for your questions, making them accessible to candidates during assessments.



Steps:

  • Navigate to the Library Page:
  • Log in to your Xobin dashboard.
  • From the left-side navigation bar, click on “Library”.


Create a New Problem:

  • Once on the Library page, select the **“Create Question” **button.
  • From the dropdown list select “Create SQL Question” option



**Problem Information: ** Fill in the basic problem information:


  1. Select Domain: Choose the relevant domain for your SQL question from the available options.
  2. Set Difficulty Level: Specify whether the question is easy, medium, or hard.
  3. Write a Title: Provide an appropriate title for your question.




**Question Statement: ** In the question statement section:


  1. Add Problem Statement: Enter the problem statement for your SQL question.
  2. **Media Attachments: **You can upload images, videos, or audios to enhance your problem statement.
  3. **Formatting Tools: **Utilize basic formatting tools to structure your problem statement effectively.




Configure SQL Instance: In this section, you’ll set up the SQL table for your question:


  1. **Select Question Type: **Choose the appropriate type (e.g., “Select” type for queries like “SELECT * FROM…”).
  2. **Validate Column Names: **Check the checkbox if you want to validate column names.
  3. Add Table Scheme: Click the “+ Add Table” button”.
  4. Enter the table name and list all column names along with their configurations.


NOTE: It is mandatory to set a column in a every table as a Primary key


  1. Validate Table Schema: **Click the **“Check Table(s)” **button to validate the schema. Look for “No Errors” next to the button. If needed, create additional tables by clicking the same **“+ Add Table” button”.
  2. Remove Tables (Optional): To delete a table, click on “+ Remove last table”.




Add queries for your Question: Add your Table’s insert query and Answer query To demonstrate the SQL functionality, let’s add sample records to our table.


NOTE: Add three different Sample Records as these are considered as Test Cases for the questions


Below are three sample INSERT queries:


  1. Sample Record #1:


  1. Sample Record #2:



  1. Sample Record #3:



  1. Write Your Answer Query: Now it’s time to create the answer query for your SQL question. Craft the query that will retrieve the desired information from the table for the problem statement.



  1. Once you’ve configured everything, click **“Execute Answer Query” **to check your result.



Confirmation: Once, you have successfully created the problem statement, table scheme and validated the Insert and Answer query. Confirm the question.


NOTE: Before saving your question, make sure you have checked the Table schema and also check if the answer query you provided matches the expected results by executing it.


  1. Click on the “Save Question” to add the question to your Library



And there you have it! Your SQL question is now fully configured and added to your library. Feel free to repeat these steps for additional questions. Good luck!


Editing a SQL Coding question:


To ensure the accuracy of your edits to an existing question, follow these steps:

  1. **Check the Table(s): **After making your changes, click the "Check Table(s)" button to verify the table structure and contents.
  2. ** Execute the Answer Query: **Click the "Execute Answer Query" button to run the provided answer query and confirm that it returns the expected results.

This process ensures that your modifications are correct and produce the desired outcome.

Updated on: 06/04/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!