我有2个表,即Event和EventTracking。
事件
id
Name
Order
事件跟踪
Id
EventId
Details
CreatedDate
我正尝试在下面的EF Core中重新创建此查询。
SELECT
events.NAME,
COUNT(eventtrackings.details) AS Count
FROM
events
LEFT JOIN
eventtrackings ON events.id = eventtrackings.eventid
WHERE
eventtrackings.CreatedDate > '4/22/2019'
GROUP BY
NAME, eventtrackings.CreatedDate
ORDER BY
events.Order
我希望显示“事件”中的所有内容,但过滤器位于跟踪部分。