-- Sample Q&A Questions for Testing
-- Insert some sample open-ended questions for various topics

-- Note: Replace topic_ids with actual topic IDs from your topics table
-- You can check your topic IDs by running: SELECT id, title FROM topics LIMIT 10;

INSERT INTO qa_questions (topic_id, question_text, expected_answer, answer_keywords, difficulty, explanation, marks, time_limit, is_ai_generated, user_id) VALUES

-- Sample questions for topic ID 125 (adjust based on your actual topic IDs)
(125, 'Explain the concept of percentage change and provide the mathematical formula.', 
'Percentage change is calculated using the formula: ((New Value - Original Value) / Original Value) × 100%. This measures the relative change from the original value to the new value, expressed as a percentage.', 
'["percentage change", "formula", "new value", "original value", "relative change", "mathematics"]', 
'medium', 'This question tests understanding of basic percentage calculations and mathematical notation.', 
2, 300, 0, NULL),

(125, 'What are the key differences between absolute change and percentage change? Provide examples.',
'Absolute change is the simple difference between two values (New - Old), while percentage change expresses this difference as a percentage of the original value. For example: if a price increases from $100 to $120, the absolute change is $20, but the percentage change is 20%.',
'["absolute change", "percentage change", "difference", "examples", "comparison", "calculation"]',
'medium', 'This question assesses the ability to distinguish between different types of mathematical changes.',
3, 400, 0, NULL),

-- Add more sample questions for different topics (adjust topic_ids)
(126, 'Describe the importance of units and dimensions in scientific measurements.',
'Units and dimensions are fundamental in science because they provide a standard way to quantify physical quantities. Dimensions tell us what kind of quantity we are measuring (length, time, mass), while units give us the scale (meters, seconds, kilograms). This ensures consistency and allows for accurate communication of scientific data.',
'["units", "dimensions", "scientific measurements", "physical quantities", "standardization", "accuracy"]',
'easy', 'This question evaluates understanding of basic scientific measurement principles.',
2, 350, 0, NULL),

(127, 'Explain the sources of experimental errors and how they can be minimized.',
'Experimental errors come from systematic errors (consistent bias in measurements) and random errors (unpredictable variations). They can be minimized by: calibrating instruments, taking multiple measurements, using proper technique, controlling environmental factors, and using appropriate measurement tools with sufficient precision.',
'["experimental errors", "systematic errors", "random errors", "calibration", "multiple measurements", "precision"]',
'hard', 'This question tests knowledge of experimental methodology and error analysis.',
4, 500, 0, NULL);

-- Note: Make sure to update the topic_id values to match actual topic IDs in your database
