- Click on Upload Schema to upload a .sql file containing the queries (the file’s size should be less than 5MB).
- Click on Write Schema to write the queries in the Schema Definition Query Editor and then click on Save Changes.
Note: If you choose multiple variants, then you have to upload/write schema queries for all the variants that you
• Question Details: The description of the question will come here, which should include the problem statement. The Problem Statement should include specific instructions on the desired output of the query.For instance, “Write a query to get top five employees from each department in ascending order of their name. Employees without any department are to be excluded.The output should show ENAME, DEPTNAME, SALARY attributes in the same order.”Note: You can make use of the editor menu on top to add specific formatting in the problem statement such as images, code snippets, etc.
• Difficulty Level: Assign a difficulty level to your question. You can set it to Easy, Medium, or Difficult by clicking on the drop-down.• Question Tags (Optional): This field stores the meta-data about the question.Note: You can leave this field empty.
• Select Schema: Select a schema from the dropdown menu. These are the same schemas which you have created.Clicking on Manage Schema will take you to the All-Database Schema page where you can view and edit the existing schemas.Note: Only the name of a database can be edited, no other feature of a database can be changed once it is created.
After selecting the Schema, the database tab gets opened.
• Expected Query: Enter the correct output query that will be used to retrieve an output dataset against which the output retrieved from the test-taker’s query will be checked for grading.Note: Make sure this query is syntactically correct. In case you have added multiple database variants, you will be required to enter expected output queries for all of them in separate query editors.
• Order By (Optional): Enter the order in which the output of the expected query would be displayed in case the question demands the output to be in a specific order.Use the following format for entering the order: `field name(s)` [asc/desc]You can leave this field empty as required by the question.You can click on View Schema to view details of your schema.
If there are multiple database variants available in the schema that you have chosen, you have to write the expected query for all the variants.Enable Mark as Default for whichever database variant you want to appear on the test-taker's screen by default.
Click on Add Test Case to proceed.