Question
Anjali has enough money to buy either 50 chocolates or
75 candies. She decides to keep 30% of her money and spends the rest to buy 20 chocolates and some candies. If she buys 'x' candies, find the value of 'x'.Solution
Let the cost of a chocolate and a candy be Rs. 'a' and Rs. 'b' respectively. So, 50a = 75b Or, a : b = 3 : 2 Let a = 3k and b = 2k Total money = 50 × 3k = Rs. 150k Remaining money = 0.70 × 150k = Rs. 105k So, 105k = 20 × 3k + 2k × x Or, 105k = 60k + 2k × x Or, 45 = 2x Or, x = 22.5
A `BEFORE INSERT` trigger fires:
Which SQL keyword is used to eliminate duplicate rows in a query result?
What is an SQL `VIEW`?
Which type of trigger fires once for each row affected by the triggering DML statement?
Which SQL clause is used to filter results after a GROUP BY operation?
Which SQL statement combines the results of two queries and removes duplicates?
When does an implicit cursor get automatically declared and managed by PL/SQL?
Which command removes all rows but keeps table structure?
Which SQL constraint ensures that a column’s values are unique across the table?
What is the primary purpose of a PL/SQL `CURSOR`?