以下の要件に対して適切なクエリを作成するにはどうすればよいでしょうか。
employee
3列のテーブルがあります
1. Employee ID
2. ManagerID
3. LocationID
最初に返される出力 (1 または 2 または 3 または 4 またはなし) を返したいと思います。追加条件はこちら。
1. EmployeeID = 1233 and ManagerID = 2222 and LocationID = 3333
2. EmployeeID = 1233 and ManagerID is null and LocationID = 3333
3. EmployeeID = 1233 and ManagerID = 2222 and LocationID = 3333
4. EmployeeID = 1233 and ManagerID is null and LocationID is null
このようなロジックが欲しいです。誰でもクエリを取得するのを手伝ってくれますか。