By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
PersonId | Pos | FavoriteColors | AllGifts | BirthDayGifts | HolidayGifts |
---|---|---|---|---|---|
1234 | 1 | Blue | Mug | Mug | Computer |
1234 | 2 | Green | Phone | Candle | Phone |
1234 | 3 | Purple | Candle | Boardgame | null |
1234 | 4 | Yellow | Computer | Basketball | null |
1234 | 5 | Orange | Boardgame | null | null |
1234 | 6 | Red | Basketball | null | null |
1234 | 7 | Gray | null | null | null |
1234 | 8 | Brown | null | null | null |
2222 | 1 | Yellow | null | null | null |
4000 | 1 | Pink | Clothes | Handsoap | null |
4118 | 1 | Pink | Clothes | Handsoap | Clothes |
4118 | 2 | Green | Handsoap | null | null |
PersonId | gift |
---|---|
1234 | Book |
2222 | Book |
4118 | Book |
4442 | Book |
PersonId | Pos | FavoriteColors | AllGifts | BirthDayGifts | HolidayGifts | update_AllGifts | update_HolidayGifts | NextPos |
---|---|---|---|---|---|---|---|---|
1234 | 1 | Blue | Mug | Mug | Computer | 0 | 0 | 8 |
1234 | 2 | Green | Phone | Candle | Phone | 0 | 0 | 8 |
1234 | 3 | Purple | Candle | Boardgame | null | 0 | 1 | 8 |
1234 | 4 | Yellow | Computer | Basketball | null | 0 | 0 | 8 |
1234 | 5 | Orange | Boardgame | null | null | 0 | 0 | 8 |
1234 | 6 | Red | Basketball | null | null | 0 | 0 | 8 |
1234 | 7 | Gray | null | null | null | 1 | 0 | 8 |
1234 | 8 | Brown | null | null | null | 0 | 0 | 8 |
2222 | 1 | Yellow | null | null | null | 0 | 0 | 1 |
4000 | 1 | Pink | Clothes | Handsoap | null | 0 | 0 | 1 |
4118 | 1 | Pink | Clothes | Handsoap | Clothes | 0 | 0 | 2 |
4118 | 2 | Green | Handsoap | null | null | 0 | 1 | 2 |
PersonId | Pos | FavoriteColors | AllGifts | BirthDayGifts | HolidayGifts |
---|---|---|---|---|---|
1234 | 1 | Blue | Mug | Mug | Computer |
1234 | 2 | Green | Phone | Candle | Phone |
1234 | 3 | Purple | Candle | Boardgame | null |
1234 | 4 | Yellow | Computer | Basketball | null |
1234 | 5 | Orange | Boardgame | null | null |
1234 | 6 | Red | Basketball | null | null |
1234 | 7 | Gray | null | null | null |
1234 | 8 | Brown | null | null | null |
2222 | 1 | Yellow | null | null | null |
4000 | 1 | Pink | Clothes | Handsoap | null |
4118 | 1 | Pink | Clothes | Handsoap | Clothes |
4118 | 2 | Green | Handsoap | null | null |
4118 | 3 | null | null | null | null |
PersonId | Pos | FavoriteColors | AllGifts | BirthDayGifts | HolidayGifts | update_AllGifts | update_HolidayGifts | prev_not_exists |
---|---|---|---|---|---|---|---|---|
1234 | 1 | Blue | Mug | Mug | Computer | 0 | 0 | 1 |
1234 | 2 | Green | Phone | Candle | Phone | 0 | 0 | 0 |
1234 | 3 | Purple | Candle | Boardgame | null | 0 | 1 | 0 |
1234 | 4 | Yellow | Computer | Basketball | null | 0 | 0 | 0 |
1234 | 5 | Orange | Boardgame | null | null | 0 | 0 | 0 |
1234 | 6 | Red | Basketball | null | null | 0 | 0 | 0 |
1234 | 7 | Gray | null | null | null | 1 | 0 | 0 |
1234 | 8 | Brown | null | null | null | 0 | 0 | 0 |
2222 | 1 | Yellow | null | null | null | 0 | 0 | 1 |
4118 | 1 | Pink | Clothes | Handsoap | Clothes | 0 | 0 | 1 |
4118 | 2 | Green | Handsoap | null | null | 0 | 1 | 0 |
4118 | 3 | null | null | null | null | 1 | 0 | 0 |
PersonId | Pos | FavoriteColors | AllGifts | BirthDayGifts | HolidayGifts |
---|---|---|---|---|---|
1234 | 1 | Blue | Mug | Mug | Computer |
1234 | 2 | Green | Phone | Candle | Phone |
1234 | 3 | Purple | Candle | Boardgame | Book |
1234 | 4 | Yellow | Computer | Basketball | null |
1234 | 5 | Orange | Boardgame | null | null |
1234 | 6 | Red | Basketball | null | null |
1234 | 7 | Gray | Book | null | null |
1234 | 8 | Brown | null | null | null |
2222 | 1 | Yellow | Book | null | Book |
4000 | 1 | Pink | Clothes | Handsoap | null |
4118 | 1 | Pink | Clothes | Handsoap | Clothes |
4118 | 2 | Green | Handsoap | null | Book |
4118 | 3 | null | Book | null | null |