-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInsertUpdate.txt
More file actions
152 lines (119 loc) · 4.41 KB
/
InsertUpdate.txt
File metadata and controls
152 lines (119 loc) · 4.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
-- Insert a new account
INSERT INTO Accounts (AccountID, Username, Password)
VALUES (1, 'user123', 'password');
-- Update account password
UPDATE Accounts
SET Password = 'newpassword'
WHERE AccountID = 1;
-- Insert a new game
INSERT INTO Game (GameID, Title, Studio, Genre, Rating)
VALUES (101, 'Destiny', 'Bungie', 'RPG', 'T');
-- Update the genre of a game
UPDATE Game
SET Genre = 'MMO'
WHERE GameID = 101;
-- Insert a platform release for a game
INSERT INTO PlatformRelease (ReleaseID, GameID, Platform, Price, ReleaseDate)
VALUES (201, 101, 'PlayStation 5', 69.99, '2024-11-15');
-- Update the price of a platform release
UPDATE PlatformRelease
SET Price = 59.99
WHERE ReleaseID = 201;
-- Insert a new game statistics entry
INSERT INTO GameStats (Title, Studio)
VALUES ('Destiny', 'Bungie');
-- Correct a typo in the game title
UPDATE GameStats
SET Title = 'Destiny 2'
WHERE Title = 'Destony' AND Studio = 'Bungie';
-- Insert a new item
INSERT INTO Item (ItemID, Name, Description)
VALUES (301, 'Ice Breaker', 'Generates Ammo');
-- Update the item description
UPDATE Item
SET Description = 'Generates ammo upon precision damage'
WHERE ItemID = 301;
-- Insert item usage statistics
INSERT INTO ItemUsage (Title, Studio, ItemID, UsagePercent)
VALUES ('Destiny 2', 'Bungie', 301, 1.0);
-- Update item usage percentage
UPDATE ItemUsage
SET UsagePercent = 2.0
WHERE Title = 'Destiny 2' AND Studio = 'Bungie' AND ItemID = 301;
-- Insert a new class
INSERT INTO Classes (ClassName, Description)
VALUES ('Hunter', 'Movement Based');
-- Update class description
UPDATE Classes
SET Description = 'Movement based class with abilities'
WHERE ClassName = 'Hunter';
-- Insert class usage data
INSERT INTO ClassUsage (Title, Studio, ClassName, UsagePercent)
VALUES ('Destiny', 'Bungie', 'Hunter', 50.0);
-- Update class usage percent
UPDATE ClassUsage
SET UsagePercent = 55.5
WHERE Title = 'Destiny' AND Studio = 'Bungie' AND ClassName = 'Hunter';
-- Insert a new build
INSERT INTO Builds (BuildID, Description)
VALUES (401, 'Solar Build: High DPS');
-- Update build description
UPDATE Builds
SET Description = 'Solar Build: Uses Celestial Nighthawk for DPS'
WHERE BuildID = 401;
-- Insert popular build entry
INSERT INTO PopularBuilds (Title, Studio, BuildID)
VALUES ('Destiny 2', 'Bungie', 401);
-- Update build ID in popular builds
UPDATE PopularBuilds
SET BuildID = 402
WHERE Title = 'Destiny 2' AND Studio = 'Bungie' AND BuildID = 401;
-- Insert a new character
INSERT INTO Characters (AccountID, Studio, Title, CharName, Class)
VALUES (1, 'Bungie', 'Destiny 2', 'Exo', 'Hunter');
-- Update character's class
UPDATE Characters
SET Class = 'Titan'
WHERE AccountID = 1 AND CharName = 'Exo';
-- Insert game-class association
INSERT INTO GameClass (Title, Studio, Class)
VALUES ('Destiny', 'Bungie', 'Hunter');
-- Update class name in GameClass (e.g., class renamed from Hunter to Titan)
UPDATE GameClass
SET Class = 'Titan'
WHERE Title = 'Destiny' AND Studio = 'Bungie' AND Class = 'Hunter';
-- Insert character name tracking per game
INSERT INTO GameName (Title, Studio, CharName)
VALUES ('Destiny 2', 'Bungie', 'Exo');
-- Update character name
UPDATE GameName
SET CharName = 'Human'
WHERE Title = 'Destiny 2' AND Studio = 'Bungie' AND CharName = 'Exo';
-- Insert account-level statistics
INSERT INTO AccountStats (AccountID, Title, Studio, Stats)
VALUES (1, 'Destiny 2', 'Bungie', 'Light Level 2011');
-- Update account-level statistics
UPDATE AccountStats
SET Stats = 'Light Level 2035'
WHERE AccountID = 1 AND Title = 'Destiny 2' AND Studio = 'Bungie';
-- Insert an inventory record for a character
INSERT INTO Inventory (AccountID, Studio, Title, CharName, ItemID)
VALUES (1, 'Bungie', 'Destiny 2', 'Exo', 301);
-- Update inventory to reflect new item
UPDATE Inventory
SET ItemID = 302
WHERE AccountID = 1 AND CharName = 'Exo' AND ItemID = 301;
-- Insert a stat type definition
INSERT INTO StatTypes (Studio, Title, StatName, Description)
VALUES ('Bungie', 'Destiny', 'Resilience', 'Affects total health');
-- Update stat type description
UPDATE StatTypes
SET Description = 'Sets shield health'
WHERE Studio = 'Bungie' AND Title = 'Destiny' AND StatName = 'Resilience';
-- Insert a character stat
INSERT INTO CharacterStats (AccountID, Studio, Title, CharName, StatName, StatValue)
VALUES (1, 'Bungie', 'Destiny 2', 'Exo', 'Resilience', 100.0);
-- Update a character stat value
UPDATE CharacterStats
SET StatValue = 82.0
WHERE AccountID = 1 AND CharName = 'Exo' AND StatName = 'Resilience';