DEV Community

Discussion on: How to write this SQL select the best way?

Collapse
 
dmfay profile image
Dian Fay

O/RMs don't help with this kind of situation. They operate at the level of discrete records and translate them to&from objects and object graphs. Here, it's what's in the records that matters, and specifically the relationships of multiple records in the same table. It can't be abstracted to the O/RM level; SQL is the only option.