hi,
can anyone please tell me my error here.
Code:
( SELECT
Branch
,'Pawnshop' as 'Business Name'
, DateRedeem AS 'Date'
, principal * interest AS 'Net Profit'
, 'Redeem' as 'Type'
FROM pawnshop_tbl WHERE ServiceType = 'Redeem'|| ServiceType = 'Renew' )
UNION
( SELECT
Branch
,'Pawnshop' as 'Business Name'
, DateSold AS 'Date'
, AuctionPrice - Principal AS 'Net Profit'
, 'Sold' as 'Type'
FROM sold_tbl );
it outputs wrong count of records, 27 records only, and what i want is 60 records.
what i need is joining the results of two tables.
please.
thanks in advance
