odistinct = DISTINCT orderstatus.order_status Above statement will not work as DISTINCT operator will work on a relation but not on fields