Skip to content

Tag: sql

SQL Query doesn’t run as intended(between)

I have the following query(in postgresql), select distinct “bookings”.”memberId” from “shifts” inner join “bookings” on “bookings”.”shiftId” = “shifts”.”id” where “shifts”.”startTime” not &#…

how to solve this query using union

Display id and name for salesmen along with id and category of products in a single table. Indicate the source of the row in result by adding an additional column TYPE with possible values as ‘S’ (Salesman) and ‘P’ (Product). Display all rows. I don’t how to add column “typ…