Changes between Version 6 and Version 7 of Напредни извештаи од базата (SQL и складирани процедури)


Ignore:
Timestamp:
02/01/25 20:28:28 (20 months ago)
Author:
201205
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Напредни извештаи од базата (SQL и складирани процедури)

    v6 v7  
    3636        select count(*)
    3737        from FriendRequest fr
    38         where (fr.SenderId=u.UserId or fr.ReceiverId=u.UserId)
    39         and fr.Status='Accepted'
     38        where (fr.SenderId=u.UserId or fr.ReceiverId=u.UserId) and fr.FriendshipStatus='Accepted'
    4039    ), 0) as NumberOfFriends,
    4140    coalesce((
    … …  
    103102
    104103with BookSwapCount as(
    105         select b.Title, extract(year from t.BorrowDate) as SwapYear, count(tb.BookId) as SwapCount
     104        select b.Title, extract(year from t.BorrowDate) as SwapYear, count(eb.BookId) as SwapCount
    106105        from Transaction t join ExchangingBook eb on t.TransactionId=eb.TransactionId
    107106                join Book b on eb.BookId=b.BookId