Here’s a revised version of the text:
Example:
- Table Name:
Table1
- Primary Keys:
userid
andcurrency_value
- Required Fields:
userid
,currency_value
, andamount
- Note: The
country
field is not present in this table( need to take from other table if required).
Objective:
Develop a logic to display the output based on the user’s country.
Scenario:
For instance, if the user is from US, the currency value should be USD. Since there might be multiple records for a single user in Table1
, the logic should display the first value that matches the user’s country and its corresponding currency value, followed by the remaining records for that user.
Output:
- If the user has 5 records, all 5 should be displayed.
- If the user has only 1 record, then only that record should be displayed.
New contributor
Keerthi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.