-
Notifications
You must be signed in to change notification settings - Fork 0
/
pset7.sql
106 lines (91 loc) · 4.67 KB
/
pset7.sql
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
-- MySQL dump 10.14 Distrib 5.5.32-MariaDB, for Linux (i686)
--
-- Host: localhost Database: pset7
-- ------------------------------------------------------
-- Server version 5.5.32-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `history`
--
DROP TABLE IF EXISTS `history`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `history` (
`id` int(10) unsigned NOT NULL,
`buysell` varchar(4) COLLATE utf8_unicode_ci NOT NULL,
`symbol` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
`shares` int(10) unsigned NOT NULL,
`price` float unsigned NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `history`
--
LOCK TABLES `history` WRITE;
/*!40000 ALTER TABLE `history` DISABLE KEYS */;
INSERT INTO `history` VALUES (6,'buy','nflx',2,424.49,'2014-03-16 17:31:37'),(6,'buy','nok',3,7.54,'2014-03-16 17:31:47'),(6,'buy','nok',5,7.54,'2014-03-16 17:31:59'),(6,'sell','nflx',5,424.49,'2014-03-16 17:32:22'),(6,'sell','nok',2,7.54,'2014-03-16 17:32:33'),(15,'buy','nok',2,7.54,'2014-03-16 18:31:01'),(15,'buy','nok',2,7.54,'2014-03-16 18:31:09'),(15,'sell','nok',1,7.54,'2014-03-16 18:31:39'),(15,'sell','nok',1,7.54,'2014-03-16 18:31:51'),(17,'buy','nflx',10,424.49,'2014-03-17 11:17:43'),(17,'buy','nok',10,7.54,'2014-03-17 13:36:55');
/*!40000 ALTER TABLE `history` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `portfolio`
--
DROP TABLE IF EXISTS `portfolio`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `portfolio` (
`id` int(10) unsigned NOT NULL,
`symbol` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
`shares` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`,`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `portfolio`
--
LOCK TABLES `portfolio` WRITE;
/*!40000 ALTER TABLE `portfolio` DISABLE KEYS */;
INSERT INTO `portfolio` VALUES (6,'nok',14),(15,'nok',2),(17,'nflx',10),(17,'nok',10);
/*!40000 ALTER TABLE `portfolio` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`cash` decimal(65,4) unsigned NOT NULL DEFAULT '0.0000',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'caesar','$1$50$GHABNWBNE/o4VL7QjmQ6x0',10000.0000),(2,'hirschhorn','$1$50$lJS9HiGK6sphej8c4bnbX.',10000.0000),(3,'jharvard','$1$50$RX3wnAMNrGIbgzbRYrxM1/',10000.0000),(4,'malan','$1$HA$azTGIMVlmPi9W9Y12cYSj/',10000.0000),(5,'milo','$1$HA$6DHumQaK4GhpX8QE23C8V1',10000.0000),(7,'zamyla','$1$50$uwfqB45ANW.9.6qaQ.DcF.',10000.0000),(12,'poops','$1$cXDnNNad$SCd3bXqOgZsH45QW6RvSY0',10000.0000),(13,'akcrono','$1$lv7kntJ8$vONT3GvIS0aSIVChRBSIi/',10000.0000),(15,'skroob','$1$2Fm5UQLN$x2Sxb79z2cQDAG7NhQ4at0',9984.9200),(17,'sunny0710','$1$s6x9e46F$swdAIzODh95CNzI3BntOQ0',5679.7000);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2014-03-24 9:15:58