i need to specify following in one query: It should include the Activity_name and Child_ first_name and last_name for each child registered for the specified Activity. There is (Football/Art/IT) activities in Activity Table(which has primary_key for each activity). What would be the query that would list children registered for Art activity? Children name’s should be displayed in one column. Thanks.
i need to specify following in one query: It should include the Activity_name and
Share
Without providing your table structure, I cannot provide an accurate query.
However, if I were to design a set of tables that store a list of children, a list of activities, and a correlation between the two, it would consist of three tables named “children,” “activities,” and “linktable” in this example.
childrenstores the names and information of every child, and a unique id.activitiesstores the names and relevant information about activities, as well as a unique id. Finallly,linktablemay be something like “schedule” or “signups” in your system, and should link children to activities and allow for what is called amany-to-manyrelationship. In other words, one child may participate in many activities, and any activity may be engaged by many children.The following query is an example of how to see which children are signed up for Art: