select
e1_0."id",
c1_0."employeeid",
c1_0."skillid",
s1_0."id",
c1_0."end",
c1_0."start"
from
"employee" e1_0
left join
"skillassignment" c1_0
on e1_0."id"=c1_0."employeeid"
and (
c1_0."start" <= cast(current_timestamp as date)
and (
c1_0."end" >= cast(current_timestamp as date)
or c1_0."end" is null
)
)
and (
c1_0."start" <= cast(current_timestamp as date)
and (
c1_0."end" >= cast(current_timestamp as date)
or c1_0."end" is null
)
)
join
"skill" s1_0
on s1_0."id"=c1_0."skillid"