Title:
Given two tables risk_events (risk event table) and event_define (risk definition table).
The table data is as follows:
1. risk_events
Field description:
Event_code: Event code
Num: The number of events
Time: The time when the event occurred
2. event_define
Field description:
Code: Event Coding
Name: Event name
The event_code in Table 1 is the foreign key of Table 2code.
The name corresponding to each event and the number and time of the event closest to the current time (that is, the latest). Please pay attention to the optimization of running performance when developing.