text
stringlengths
6
9.38M
-- phpMyAdmin SQL Dump -- version 4.0.8 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 01, 2013 at 09:32 PM -- Server version: 5.6.14-log -- PHP Version: 5.4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!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 */; -- -- Database: `gru_h5_movies` -- -- -------------------------------------------------------- -- -- Table structure for table `actor` -- CREATE TABLE IF NOT EXISTS `actor` ( `actorID` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(50) NOT NULL, `last_name` varchar(50) NOT NULL, PRIMARY KEY (`actorID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ; -- -- Dumping data for table `actor` -- INSERT INTO `actor` (`actorID`, `first_name`, `last_name`) VALUES (1, 'Ben', 'Affleck'), (2, 'James', 'Franco'), (9, 'Gunnar', 'Helgi'), (10, 'jón', 'jónsson'), (11, 'Christian', 'Bale'), (12, 'Michael', ' Caine'), (13, 'Liam', 'Neeson'), (14, 'Katie', 'Holmes'), (15, 'Gary', 'Oldman'), (16, 'Cillian', 'Murphy'), (17, 'Tom', 'Wilkinson'), (18, 'Rutger', 'Hauer'), (19, 'Ken', 'Watanabe'), (20, 'Morgan', 'Freeman'); -- -------------------------------------------------------- -- -- Table structure for table `directors` -- CREATE TABLE IF NOT EXISTS `directors` ( `directorID` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(50) NOT NULL, `last_name` varchar(50) NOT NULL, PRIMARY KEY (`directorID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=161 ; -- -- Dumping data for table `directors` -- INSERT INTO `directors` (`directorID`, `first_name`, `last_name`) VALUES (1, 'Ben', 'Affleck'), (4, 'Mark', 'Webb'), (5, 'Phil', 'Lord'), (7, 'Richard', 'Berry'), (8, 'Ruben', 'Fleischer'), (9, 'Danny', 'Boyle'), (10, 'Stanley', 'Kubrick'), (11, 'Todd', 'Strauss-Schulson'), (12, 'Tom', 'Shadyac'), (13, 'Mike', 'McCoy'), (14, 'Tony', 'Kaye'), (15, 'John', 'Putch'), (16, 'Jon', 'Hurwitz'), (17, 'Adam', 'McKay'), (18, 'Mel', 'Gibson'), (19, 'Sam', 'Raimi'), (20, 'Robert', 'Zemeckis'), (21, 'Paul', 'Verhoeven'), (22, 'Jay', 'Oliva'), (23, 'Joel', 'Schumacher'), (24, 'Brandon', 'Vietti'), (25, 'Peter', 'Berg'), (26, 'Ridley', 'Scott'), (27, 'John', 'Landis'), (28, 'Walter', 'Hill'), (29, 'Christopher', 'Nolan'), (30, 'Ben', 'Stiller'), (31, 'Michael', 'Curtiz'), (32, 'Steven', 'Spielberg'), (33, 'Tom', 'Tykwer'), (34, 'Baltasar', 'Kormákur'), (35, 'Shawn', 'Levy'), (36, 'Richard', 'Linklater'), (37, 'Robert', 'Rodriguez'), (38, 'Jay', 'Roach'), (39, 'Don', 'Siegel'), (40, 'Quentin', 'Tarantino'), (41, 'Pete', 'Travis'), (42, 'Todd', 'Phillips'), (43, 'Kurt', 'Wimmer'), (44, 'Jeff', 'Schaffer'), (45, 'Kyle', 'Newman'), (46, 'Joel', 'Coen'), (47, 'Rob', 'Cohen'), (48, 'John', 'Hughes'), (49, 'Will', 'Gluck'), (50, 'F. Gary', 'Gray'), (51, 'Jon M.', 'Chu'), (52, 'Bobcat', 'Goldthwait'), (53, 'Martin', 'Scorsese'), (54, 'Clint', 'Eastwood'), (55, 'Randal', 'Kleiser'), (56, 'Martin', 'Campbell'), (57, 'Harold', 'Ramis'), (58, 'Peter', 'Webber'), (59, 'Seth', 'Gordon'), (60, 'Dean', 'DeBlois'), (61, 'Hayao ', 'Miyazaki'), (62, 'Martin', 'McDonagh'), (63, 'Olivier', 'Nakache'), (64, 'Wilson', 'Yip'), (65, 'Jon', 'Favreau'), (66, 'Timo', 'Vuorensola'), (67, 'Christopher', 'McQuarrie'), (68, 'Jay', 'Duplass'), (69, 'Brad', 'Peyton'), (70, 'Dennis', 'Dugan'), (71, 'Gary', 'McKendry'), (72, 'Jennifer', 'Yuh'), (73, 'Shane', 'Black'), (74, 'Curtis', 'Hanson'), (75, 'Tom', 'Hooper'), (76, 'Richard', 'Donner'), (77, 'Ang', 'Lee'), (78, 'Neil', 'Burger'), (79, 'Jonathan', 'Dayton'), (80, 'James', 'Mather'), (81, 'Rian', 'Johnson'), (82, 'Peter', 'Jackson'), (83, 'Susanne', 'Bier'), (84, 'Paul', 'McGuigan'), (85, 'Steven', 'Soderbergh'), (86, 'Asger', 'Leth'), (87, 'Peter', 'Weir'), (88, 'Tom', 'McGrath'), (89, 'Barry', 'Sonnenfeld'), (90, 'John', 'Woo'), (91, 'Terry', 'Jones'), (92, 'Duncan', 'Jones'), (93, 'Wes', 'Anderson'), (94, 'David', 'Zucker'), (95, 'Gregg', 'Godfrey'), (96, 'Louis', 'Leterrier'), (97, 'Spike', 'Lee'), (98, 'Molis', 'Forman'), (99, 'Michael', 'Bay'), (100, 'Greg', 'Mottola'), (101, 'David', 'Twohy'), (102, 'Jason', 'Moore'), (103, 'Oliver', 'Stone'), (104, 'Hugh', 'Wilson'), (105, 'John', 'McTiernan'), (106, 'Garry', 'Marshall'), (107, 'Robert', 'Schwentke'), (108, 'Barry', 'Levinson'), (109, 'Brett', 'Ratner'), (110, 'Phillip', 'Noyce'), (111, 'Brian', 'De Palma'), (112, 'Joss', 'Whedon'), (113, 'Edgar', 'Wright'), (114, 'David O.', 'Russell'), (115, 'Guy', 'Ritchie'), (116, 'Luke', 'Greenfield'), (117, 'Harmony', 'Korine'), (118, 'J.J.', 'Abrams'), (119, 'George', 'Lucas'), (120, 'Óskar Þór', 'Axelsson'), (121, 'Nathan', 'Greno'), (122, 'Seth', 'MacFarlane'), (123, 'James', 'Cameron'), (124, 'McG', ''), (125, 'Judd', 'Apatow'), (126, 'Joe', 'Carnahan'), (127, 'Doug', 'Liman'), (128, 'Rob', 'Reiner'), (129, 'Drew', 'Goddard'), (130, 'Larry', 'Charles'), (131, 'Simon', 'west'), (132, 'Luc', 'Besson'), (133, 'Nicholas', 'Stoller'), (134, 'Scott', 'Walker'), (135, 'Andrew', 'Davis'), (136, 'Francis Ford', 'Coppola'), (137, 'Sergio', 'Leone'), (138, 'kathryn', 'Bigelow'), (139, 'M. Night', 'Shyamalan'), (140, 'Grant', 'Heslov'), (141, 'Gareth', 'Evans'), (142, 'Florian Henckel', 'von Donnersmarck'), (143, 'Akiva', 'Schaffer'), (144, 'Robert', 'Mulligan'), (145, 'Len', 'Wiseman'), (146, 'Tony', 'Scott'), (147, 'Eli', 'Craig'), (148, 'Terry', 'Gilliam'), (149, 'Gary', 'Ross'), (150, 'Björn', 'Stein'), (151, 'Pete', 'Docter'), (152, 'Stephen', 'Sommers'), (153, 'David', 'Wain'), (154, 'Marc', 'Forster'), (155, 'Jonathan', 'Liebesman'), (156, 'Rich', 'Moore'), (157, 'Zack', 'Snyder'), (158, 'Bryan', 'Singer'), (159, 'Gavin', 'Hood'), (160, 'Kevin', 'Smith'); -- -------------------------------------------------------- -- -- Table structure for table `genre` -- CREATE TABLE IF NOT EXISTS `genre` ( `genreID` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) NOT NULL, PRIMARY KEY (`genreID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=34 ; -- -- Dumping data for table `genre` -- INSERT INTO `genre` (`genreID`, `name`) VALUES (1, 'Spennumynd'), (2, 'Gamanmynd'), (3, 'Rómantísk'), (4, 'Drama'), (5, 'Hrollvekja'), (6, 'Spennutryllir'), (7, 'Vestri'), (8, 'Glæpamynd'), (9, 'Vísindaskáldskapur'), (10, 'Ævintýramynd'), (11, 'Barnamynd'), (12, 'Fjölskyldumynd'), (13, 'Söngleikur'), (14, 'Stríðsmynd'), (15, 'Tónlistarmynd'), (16, 'Ráðgáta'), (17, 'Heimildarmynd'), (18, 'Söguleg'), (19, 'Stuttmynd'), (20, 'Æviágrip'), (21, 'Dýralífsmynd'), (22, 'Fræðslumynd'), (23, 'Teiknimynd'), (24, 'Svarthvít'), (25, 'Bardagamynd'), (26, 'Dansmynd'), (27, 'Unglingamynd'), (28, 'Íslensk mynd'), (29, 'Sjónvarpsmynd'), (30, 'Sjónvarpssería'), (31, 'Sjónvarpsþáttur'), (32, 'Íþróttamynd'), (33, ''); -- -------------------------------------------------------- -- -- Table structure for table `image` -- CREATE TABLE IF NOT EXISTS `image` ( `imageID` int(11) NOT NULL AUTO_INCREMENT, `image` varchar(100) NOT NULL, PRIMARY KEY (`imageID`), UNIQUE KEY `image` (`image`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=43 ; -- -- Dumping data for table `image` -- INSERT INTO `image` (`imageID`, `image`) VALUES (17, 'img/movies/127_Hours.jpg'), (18, 'img/movies/2001_A_Space_Odyssey.jpg'), (14, 'img/movies/21_Jump_Street.jpg'), (15, 'img/movies/22_Bullets.jpg'), (16, 'img/movies/30_Minutes_or_Less.jpg'), (13, 'img/movies/500_Days_of_Summer.jpg'), (19, 'img/movies/A _Very_Harold_&_Kumar_Christmas.jpg'), (20, 'img/movies/Ace_Ventura.jpg'), (21, 'img/movies/Act_of_Valor.jpg'), (22, 'img/movies/American_Pie_The_Book_of_Love.jpg'), (23, 'img/movies/American_Reunion.jpg'), (24, 'img/movies/Anchorman.jpg'), (9, 'img/movies/Argo.jpg'), (25, 'img/movies/Army_of_Darkness.jpg'), (26, 'img/movies/Back_to_the_Future_Part_III.jpg'), (27, 'img/movies/Basic_Instinct.jpg'), (37, 'img/movies/Batman_Begins.jpg'), (29, 'img/movies/Batman_Forever.jpg'), (28, 'img/movies/Batman_The_Dark_Knight_Returns.jpg'), (30, 'img/movies/Batman_Under_the_Red_Hood.jpg'), (31, 'img/movies/Battleship.jpg'), (32, 'img/movies/Blade_Runner.jpg'), (33, 'img/movies/Blues_Brothers.jpg'), (35, 'img/movies/Braveheart.jpg'), (36, 'img/movies/Bullet_to_the_Head.jpg'), (39, 'img/movies/Casablanca.jpg'), (40, 'img/movies/Catch_Me_If_You_Can.jpg'), (41, 'img/movies/Cloud_Atlas.jpg'), (42, 'img/movies/Contraband.jpg'), (1, 'img/movies/default.jpg'), (34, 'img/movies/Dirty_Harry.jpg'), (38, 'img/movies/The_Cable_Guy.jpg'); -- -------------------------------------------------------- -- -- Table structure for table `movies` -- CREATE TABLE IF NOT EXISTS `movies` ( `movieID` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `genreID` int(11) NOT NULL, `rating` double NOT NULL DEFAULT '0', `directorID` int(11) NOT NULL, `imageID` int(11) NOT NULL DEFAULT '1', `year` year(4) NOT NULL, `info` text NOT NULL, PRIMARY KEY (`movieID`), KEY `genreID` (`genreID`), KEY `directorID` (`directorID`), KEY `imageID` (`imageID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=54 ; -- -- Dumping data for table `movies` -- INSERT INTO `movies` (`movieID`, `name`, `genreID`, `rating`, `directorID`, `imageID`, `year`, `info`) VALUES (21, 'Argo', 1, 7.833333333333333, 1, 9, 2012, 'Acting under the cover of a Hollywood producer scouting a location for a science fiction film, a CIA agent launches a dangerous operation to rescue six Americans in Tehran during the U.S. hostage crisis in Iran in 1980.'), (23, 'Clerks II', 2, 7, 160, 1, 2006, 'A calamity at Dante and Randall''s shops sends them looking for new horizons - but they ultimately settle at Mooby''s, a fictional Disney-McDonald''s-style fast-food empire.'), (24, '(500) Days of Summer', 3, 7, 4, 13, 2009, 'Þetta er rómantísk gamanmynd um konu sem finnst sönn ást ekki vera til og ungann masnn sem heillast að henni.'), (25, '21 Jump Street', 2, 8, 5, 14, 2012, 'Tveir misheppnaðir lögregluþjónar eru sentir í framhaldsskóla til þess að stöðva eyturlyfja starfsemi.'), (26, '22 Bullets', 1, 6.5, 7, 15, 2010, 'Fyrrverandi mafíósi ákveður að hefna sín eftir að hafa verið skotinn 22 sinnum og skilinn eftir til að dayja af fyrrverandi æskuvini sínum.'), (27, '30 Minutes or Less', 2, 7.5, 8, 16, 2011, 'Tveir glæpamenn ræna pizzu sendil, festa sprengju á hann og neyða hann til að ræna banka innan klukkustunda, annars...'), (28, '127 Hours', 20, 7.5, 9, 17, 2010, 'Fjallgöngumaður festist undir hnullungi nálægt Moab, í Utah og neyðist til að gera örvæntingafullar ráðstafanir til að lifa af'), (29, '2001: A space Odyssey', 9, 0, 10, 18, 1968, 'Mannkynið finnur dularfullan hlut, grafinn undir yfirborði tunglsins. Geimfarar og gáfaða tölvan H.A.L 9000 eru send í leiðangru til að rannsaka.'), (30, 'A very Harold and Kumar 3D Christmas', 2, 7.25, 11, 19, 2011, 'Sex árum eftir ævintýri þeirra í Guantanamo Bay, valda hasshausar Harold Lee og Kumar Patel hátíðar harmri við það að kveikja í ljólatré tengdarpabba Harold.'), (31, 'Ace Ventura: Pet Detective', 2, 0, 12, 20, 1995, 'Kjánalegur rannsóknatmaður sem sérhæfir sig í dýrum, leitar að týndum höfrungi.'), (32, 'Act of Valor', 14, 6.5, 13, 21, 2012, 'Sérþjálfaðir sjóhermenn framkalla leynilegt verkefni til að bjarga rændum CIA fulltrúa.'), (33, 'American Pie: The Book of Love', 2, 0, 15, 22, 2009, 'Þrír nýjir heppnislausr unglinar finna falda Biblíu á bókasafni East Great Falls High.'), (34, 'American Reunion', 2, 5.75, 16, 23, 2012, 'Jim, Michelle, Stifler, og vinir þeirra hittast aftur í East Great Falls.'), (35, 'Anchorman: The Legend of Ron Burgundy', 2, 7, 17, 24, 2004, 'Ron Burgundy er vinsælasti fréttamaður San Diego á 8 áratugnum, þegar meirihluti fréttamann voru karlar, en allt það mun breytast þegar kona er ráðin í starfið.'), (36, 'Army of Darkness', 5, 0, 19, 25, 1992, 'Maður er óvart sendut til ársins 1300 eftir Krist, þar sem hann þarf að berjast við her af þeim dauðu og sækja Necronomicon til þess að komst aftur heim.'), (37, 'Back to th Future Part III', 9, 7.25, 20, 26, 1990, 'Doctor Emmet Brown nýtur þess að vera til árið 1885, en mun bráðlega verða drepinn af Buford "Mad Dog" Tannen. Marty McFly ferðast aftur í tímann til að bjarga vini sínum.'), (38, 'Basic Instinct', 16, 6.5, 21, 27, 1992, 'Rannsóknar-lögreglumaður sér um morð-rannsókn sem gullfalleg, lokkandi kona gæti komið rannsókninni við.'), (39, 'Batman: The Dark Knight Returns', 23, 8, 22, 28, 2012, 'Leðurblökumaðurinn hefur ekki sést í 10 ár. Ny tegund glæpamanna ræðst á Gotham borg, sem neyðir 55 ára gamlan Bruce Wayne til að klæðast búningnum enn á ný. En, hefur hann það sem hann þarf til að stöðva glæpi á þessu nýja tímabili?'), (40, 'Batman Forever', 1, 5.5, 23, 29, 1995, 'Leðurblökumaðurinn þarf að berjast við Two-Face og Ráðgátumanninn með aðstoð Robin.'), (41, 'Batman: Under the Red Hood', 23, 0, 24, 30, 2010, 'Það er ráðgáta á kreik í Gotham borg, og Leðurblökumaðurinn þarf að slást við dularfullan löggæslumann, sem kallast Rauða Hettan.'), (42, 'Battleship', 9, 0, 25, 31, 2012, 'Floti herskipa neyðist til þess að berjast við her af óþekktum uppruna til að get fundið út ætlun þeirra.'), (43, 'Blade Runner', 9, 7.5, 26, 32, 1982, 'Deckard, Blade Runner, þaf að elta uppi og tortíma fjórum eftirhermum sem rændu geimskipi og snéru aftur til jarðar í leit að skapara sínum.'), (44, 'The Blues Brothers', 2, 5, 27, 33, 1980, 'Jake Blues, sem er ný kominn úr fangelsi, fær hljómsveitina sína aftur saman til þess að bjarga Kaþóliska heimilinu sem hann og bróðir hanns Elwood ólust upp.'), (46, 'Braveheart', 1, 0, 18, 35, 1995, 'Þegar leynilega eiginkona hans her tekin af lífi fyrir líkamsárás gegn hermanni sem gerði tilraun til nauðgunar, byrjar alþýðumaður mótspyrnu og leiðir Skoska stríðsmenn gegn illa Enska harðstjóranum sem stjórnar Skotlandi með járn hendi.'), (47, 'Bullet to the Head', 1, 5.75, 28, 36, 2012, 'Eftir að hafa séð félagana sýna drepna, koma New Orleans skytta og Washington D.C. lögga saman til þess að ná sameigninlega óvini sínum.'), (48, 'Batman Begins', 1, 8.333333333333334, 29, 37, 2005, 'Eftir að hafa æft með leiðbeinanda sín, Hefur Leðurblökumaðurinn baráttu geng glæpastarfsemi til að frelsa Gotham Borg.'), (49, 'The Cable Guy', 2, 6.5, 30, 38, 1996, 'Einmanna rafvirki sem var uppalinn í sjónvarpi, vill bara eignast nýjan vin, en manneskjan sem hann vill vingast við, neytar honum, sem veldur slæmum afleyðingum.'), (50, 'Casablanca', 4, 0, 31, 39, 1942, 'Myndin á sér stað í Afríku snemma í seinni heimstyrjöldini: Bandarískur útlagi hittir fyrrverandi ástvin sinn, en það koma ófyrirsjáanleg vandkvæði í ljós.'), (51, 'Catch Me If You Can', 20, 0, 32, 40, 2002, 'Sannsöguleg mynd um Frank Abagnale Jr., sem tókts að dobla launaseðla með milljónir dollara virði sem Flugmaður hjá Pan Am, læknir, og saksóknari.'), (52, 'Cloud Atlas', 10, 7.5, 33, 41, 2012, 'Skoðað er hvernig verknaður lífa einstaklinga hefur áhrif á önnur í fortíðini, nútímanum og framtíðini, þegar einni sál er mótað úr morðingja í hetju, og góðverk liðast í gegnum aldir sem erður á endanum innblástur byltingar.'), (53, 'Contraband', 1, 7.5, 34, 42, 2012, 'Till þess að vernda tengdar-bróður sinn gegn eiturlyfjabaróni, fer fyrrverandi smyglari til Panama til að ná í milljónir dollara af fölsuðum seðlum.'); -- -------------------------------------------------------- -- -- Table structure for table `movies_has_actor` -- CREATE TABLE IF NOT EXISTS `movies_has_actor` ( `movies_has_actorID` int(11) NOT NULL AUTO_INCREMENT, `movieID` int(11) NOT NULL, `actorID` int(11) NOT NULL, PRIMARY KEY (`movies_has_actorID`), KEY `movieID` (`movieID`), KEY `actorID` (`actorID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ; -- -- Dumping data for table `movies_has_actor` -- INSERT INTO `movies_has_actor` (`movies_has_actorID`, `movieID`, `actorID`) VALUES (2, 21, 1), (3, 48, 11), (4, 48, 12), (5, 48, 13), (6, 48, 14), (7, 48, 15), (8, 48, 16), (9, 48, 17), (10, 48, 18), (11, 48, 19), (12, 48, 20); -- -------------------------------------------------------- -- -- Table structure for table `user` -- CREATE TABLE IF NOT EXISTS `user` ( `userID` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(30) NOT NULL, `password` varchar(250) NOT NULL, `first_name` varchar(50) NOT NULL, `last_name` varchar(50) NOT NULL, `user_status` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`userID`), KEY `first_name` (`first_name`,`last_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ; -- -- Dumping data for table `user` -- INSERT INTO `user` (`userID`, `username`, `password`, `first_name`, `last_name`, `user_status`) VALUES (4, 'username', '5f4dcc3b5aa765d61d8327deb882cf99', 'user', 'name', 0), (7, 'halldor32', '5f4dcc3b5aa765d61d8327deb882cf99', 'Halldór', 'Smári', 1), (8, 'aalex315', '530b0642d0a7a4c12a7841423308707f', 'Alexander', 'Leósson', 1), (9, 'GunMaster', 'c31d2988b0e4fb3d978b926eb17303b6', 'Gunnar Helgi', 'Sölvason', 1), (10, 'lexi', 'e81bbf8d0006b29f6541db47c7493105', 'lexi', 'lexasson', 0), (11, 'RandomGaur', 'd41d8cd98f00b204e9800998ecf8427e', 'Random', 'Gaur', 0), (12, 'Fegt', 'd41d8cd98f00b204e9800998ecf8427e', 'Ingvar', 'Valberg', 0), (13, 'Eggert', 'd41d8cd98f00b204e9800998ecf8427e', 'Eggert', 'Smári', 0), (14, 'jamiees2@gmail.com', 'd41d8cd98f00b204e9800998ecf8427e', 'DJAMZ', 'DJAMZ', 0); -- -------------------------------------------------------- -- -- Table structure for table `user_has_movies` -- CREATE TABLE IF NOT EXISTS `user_has_movies` ( `user_has_moviesID` int(11) NOT NULL AUTO_INCREMENT, `userID` int(11) NOT NULL, `movieID` int(11) NOT NULL, `rating` double NOT NULL, `review` text, PRIMARY KEY (`user_has_moviesID`), KEY `movieID` (`movieID`), KEY `userID` (`userID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=42 ; -- -- Dumping data for table `user_has_movies` -- INSERT INTO `user_has_movies` (`user_has_moviesID`, `userID`, `movieID`, `rating`, `review`) VALUES (2, 7, 25, 8, NULL), (3, 7, 27, 6.5, NULL), (4, 7, 29, 5.5, NULL), (5, 7, 42, 6, NULL), (6, 7, 43, 7.5, NULL), (7, 13, 46, 7, NULL), (8, 7, 34, 5.5, NULL), (9, 8, 49, 5.5, NULL), (10, 8, 53, 7.5, NULL), (11, 8, 48, 8, 'Svo freaking awesome mynd og Ísland svo freaking beautiful í myndinni OH MY GAAAWSH'), (12, 8, 25, 7.5, NULL), (13, 7, 52, 7.5, NULL), (14, 8, 30, 7, NULL), (15, 7, 24, 7, NULL), (16, 8, 32, 6.5, NULL), (17, 7, 40, 5.5, NULL), (18, 8, 38, 6, NULL), (19, 8, 47, 5.5, NULL), (20, 7, 39, 8, 'OMG '), (21, 8, 39, 8, NULL), (23, 10, 21, 10, NULL), (24, 7, 21, 6, NULL), (25, 8, 44, 5, NULL), (26, 8, 21, 7.5, NULL), (27, 8, 27, 7.5, NULL), (28, 7, 38, 7, NULL), (29, 7, 30, 7.5, NULL), (30, 8, 26, 6.5, NULL), (31, 7, 23, 7, NULL), (32, 7, 47, 6, NULL), (33, 7, 48, 8, 'asads'), (34, 7, 49, 7.5, NULL), (35, 9, 48, 9, 'Batman pls\r\n'), (36, 7, 53, 7.5, 'asdadsc'), (37, 8, 34, 6, 'rehewrerbhetbnetnberber'), (38, 8, 37, 7, NULL), (39, 7, 35, 7, NULL), (40, 14, 37, 7.5, NULL), (41, 10, 28, 7.5, 'I NEED MORE'); -- -- Constraints for dumped tables -- -- -- Constraints for table `movies` -- ALTER TABLE `movies` ADD CONSTRAINT `movies_ibfk_1` FOREIGN KEY (`genreID`) REFERENCES `genre` (`genreID`), ADD CONSTRAINT `movies_ibfk_2` FOREIGN KEY (`directorID`) REFERENCES `directors` (`directorID`), ADD CONSTRAINT `movies_ibfk_3` FOREIGN KEY (`imageID`) REFERENCES `image` (`imageID`); -- -- Constraints for table `movies_has_actor` -- ALTER TABLE `movies_has_actor` ADD CONSTRAINT `fk_movies_has_actor_actor1` FOREIGN KEY (`actorID`) REFERENCES `actor` (`actorID`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_movies_has_actor_movies1` FOREIGN KEY (`movieID`) REFERENCES `movies` (`movieID`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Constraints for table `user_has_movies` -- ALTER TABLE `user_has_movies` ADD CONSTRAINT `fk_user_has_movies_movies1` FOREIGN KEY (`movieID`) REFERENCES `movies` (`movieID`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `fk_user_has_movies_user1` FOREIGN KEY (`userID`) REFERENCES `user` (`userID`) ON DELETE NO ACTION ON UPDATE NO ACTION; /*!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 */;
insert into avatars (avatar_base_type_id, level, skin, hair, picture_url, night_background_url, day_background_url, status, text_id, created_by, created_date) values (7, 1, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 2, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 3, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 4, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 5, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 6, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 7, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 8, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 9, 1, 2, 's1h2.png', 'night1.png', 'day1.png', 'ACTIVE', 1, 1, current_timestamp), (7, 10, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 11, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 12, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 13, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 14, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 15, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 16, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 17, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 18, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 19, 1, 2, 's1h2.png', 'night10.png', 'day10.png', 'ACTIVE', 1, 1, current_timestamp), (7, 20, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 21, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 22, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 23, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 24, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 25, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 26, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 27, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 28, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 29, 1, 2, 's1h2.png', 'night20.png', 'day20.png', 'ACTIVE', 1, 1, current_timestamp), (7, 30, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 31, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 32, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 33, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 34, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 35, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 36, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 37, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 38, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 39, 1, 2, 's1h2.png', 'night30.png', 'day30.png', 'ACTIVE', 1, 1, current_timestamp), (7, 40, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 41, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 42, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 43, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 44, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 45, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 46, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 47, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 48, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp), (7, 49, 1, 2, 's1h2.png', 'night40.png', 'day40.png', 'ACTIVE', 1, 1, current_timestamp);
DROP TABLE oa_leave; DROP TABLE ec_pro; DROP TABLE ec_bxd; DROP TABLE cl_fee; DROP TABLE cl_qt; DROP TABLE cl_snjt; DROP TABLE cl_zs; DROP TABLE cl_ytjt; DROP TABLE cl_bxd; DROP TABLE ht_invoice; DROP TABLE ht_schedule; DROP TABLE ht_info; DROP TABLE project; CREATE TABLE project ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, no VARCHAR(64) NOT NULL, name VARCHAR(128) NOT NULL, cjrq DATE DEFAULT NOW() NOT NULL, depart VARCHAR(32) NULL, completed TINYINT DEFAULT 0 NOT NULL, memo VARCHAR2(256) NULL ); CREATE TABLE ht_info ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, no VARCHAR(64) NOT NULL, name VARCHAR(128) NOT NULL, time DATE NOT NULL, value NUMERIC(10,2) NOT NULL, oorgan VARCHAR(128) NOT NULL, obank VARCHAR(64) NOT NULL, oaccount VARCHAR(32) NOT NULL, ocontact VARCHAR(32) NULL, otel VARCHAR(32) NULL, ofax VARCHAR(32) NULL, oemail VARCHAR(32) NULL, depart VARCHAR(32) NULL, contact VARCHAR(32) NULL, completed TINYINT DEFAULT 0 NOT NULL, memo VARCHAR(256) NULL ); CREATE TABLE ht_schedule ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES ht_info(id), time DATE NOT NULL, demand VARCHAR(256) NOT NULL, value VARCHAR(32) NOT NULL, memo VARCHAR(256) NULL ); CREATE TABLE ht_invoice ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES ht_info(id), time DATE NOT NULL, no VARCHAR(32) NOT NULL, value NUMERIC(10,2) NOT NULL, content VARCHAR(256) NOT NULL, memo VARCHAR(256) NULL ); CREATE TABLE ht_pay ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES ht_info(id), time DATE NOT NULL, value NUMERIC(10,2) NOT NULL, memo VARCHAR(256) NULL ); CREATE TABLE cl_bxd ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, applyuserid INT DEFAULT 0 NOT NULL, name VARCHAR(32) NOT NULL, fno VARCHAR(32) NOT NULL, bxdate DATE NOT NULL, department VARCHAR(32) NOT NULL, position VARCHAR(32) NOT NULL, reason VARCHAR(64) NOT NULL, telext VARCHAR(8) NULL, alp VARCHAR(64) NULL, fdbk VARCHAR(64) NULL, total NUMERIC(10,2) DEFAULT 0 NOT NULL, cstdep VARCHAR(64) NULL, cstpro VARCHAR(128) NULL, completed TINYINT DEFAULT 0 NOT NULL, procinstid VARCHAR(32) NULL ); CREATE TABLE cl_ytjt ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES cl_bxd(id), sdate DATE NOT NULL, spoint VARCHAR(32) NOT NULL, edate DATE NOT NULL, epoint VARCHAR(32) NOT NULL, trfct VARCHAR(32) NOT NULL, tcktno SMALLINT NOT NULL, money NUMERIC(8,2) NOT NULL, instrct VARCHAR(64) NULL ); CREATE TABLE cl_zs ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES cl_bxd(id), sdate DATE NOT NULL, edate DATE NOT NULL, point VARCHAR(32) NOT NULL, reimbw SMALLINT NOT NULL, tcktno SMALLINT NOT NULL, money NUMERIC(8,2) NOT NULL, instrct VARCHAR(64) NULL ); CREATE TABLE cl_snjt ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES cl_bxd(id), sdate DATE NOT NULL, spoint VARCHAR(64) NOT NULL, epoint VARCHAR(64) NOT NULL, trfct VARCHAR(32) NOT NULL, tcktno SMALLINT NOT NULL, money NUMERIC(8,2) NOT NULL ); CREATE TABLE cl_qt ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES cl_bxd(id), popse VARCHAR(64) NOT NULL, tcktno SMALLINT NOT NULL, money NUMERIC(8,2) NOT NULL, memo VARCHAR(128) NULL ); CREATE TABLE cl_fee ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, position VARCHAR(32) NOT NULL, pro VARCHAR(32) NOT NULL, money NUMERIC(8,2) NOT NULL ); CREATE TABLE ec_bxd ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, userid INT NOT NULL, name VARCHAR(32) NOT NULL, fno VARCHAR(32) NOT NULL, bxdate DATE NOT NULL, department VARCHAR(32) NOT NULL, tcktno NUMERIC(5) NOT NULL, memo VARCHAR(256) NULL ); CREATE TABLE ec_pro ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id0 INT NOT NULL REFERENCES ec_bxd(id), pro VARCHAR(64) NOT NULL, abstr VARCHAR(64) NOT NULL, money NUMERIC(8,2) NOT NULL, memo VARCHAR(256) NULL );
CREATE PROC [Maestro].[Usp_Sel_Mes_Periodo_By_Anio] @IdAnio INT AS BEGIN SELECT DISTINCT M.ID, M.Nombre, P.ID IdPeriodo, M.Valor FROM Maestro.Mes M INNER JOIN ERP.Periodo P ON M.ID = P.IdMes WHERE P.IdAnio = @IdAnio AND M.FlagContabilidad <> 1 END
CREATE TABLE users ( user_id bigint(20) NOT NULL AUTO_INCREMENT, first_name varchar(100) NOT NULL, last_name varchar(100) NOT NULL, email varchar(100) NOT NULL, email_verified BOOLEAN NOT NULL, password varchar(255) NOT NULL, PRIMARY KEY (user_id) );
INSERT INTO annotation_pair_value (pair_id, value_id) SELECT (SELECT ap.id FROM annotation_pair as ap WHERE ap.annotation1 = (SELECT a.id FROM annotation as a WHERE a.code="opennlp") AND ap.annotation2 = (SELECT a.id FROM annotation as a WHERE a.description="Structure")), (SELECT a.id FROM annotation as a WHERE a.description="Sentence"); INSERT INTO annotation_pair_value (pair_id, value_id) SELECT (SELECT ap.id FROM annotation_pair as ap WHERE ap.annotation1 = (SELECT a.id FROM annotation as a WHERE a.code="opennlp") AND ap.annotation2 = (SELECT a.id FROM annotation as a WHERE a.description="Structure")), (SELECT a.id FROM annotation as a WHERE a.description="Paragraph"); INSERT INTO annotation_pair_value (pair_id, value_id) SELECT (SELECT ap.id FROM annotation_pair as ap WHERE ap.annotation1 = (SELECT a.id FROM annotation as a WHERE a.code="opennlp") AND ap.annotation2 = (SELECT a.id FROM annotation as a WHERE a.description="Part of speech")), (SELECT a.id FROM annotation as a WHERE a.description="Attributive Adjective"); INSERT INTO annotation_pair_value (pair_id, value_id) SELECT (SELECT ap.id FROM annotation_pair as ap WHERE ap.annotation1 = (SELECT a.id FROM annotation as a WHERE a.code="dereko") AND ap.annotation2 = (SELECT a.id FROM annotation as a WHERE a.description="Structure")), (SELECT a.id FROM annotation as a WHERE a.description="Sentence");
-- Create a view called rock that selects all the tracks where the genre is Rock. CREATE VIEW rock AS SELECT * FROM track WHERE genre_id IN ( SELECT genre_id FROM genre WHERE name = 'Rock' ); -- Create a view called classical_count that gets a count of all the tracks from the playlist called Classical. CREATE VIEW classical_count AS -- Subquery method SELECT COUNT(*) FROM track WHERE track_id IN ( SELECT track_id FROM playlist_track WHERE playlist_id IN ( SELECT playlist_id FROM playlist WHERE name = 'Classical' ) ); CREATE VIEW classical_count AS -- Join method SELECT COUNT(*) FROM track t JOIN playlist_track pt ON t.track_id = pt.track_id JOIN playlist p ON pt.playlist_id = p.playlist_id WHERE p.name = 'Classical';
CREATE USER [CCB\GrahamM] FOR LOGIN [CCB\GrahamM];
SELECT c.CUSTOMER_ID, o.STATUS, COUNT(*) FROM ANALYTICS.ANALYTICS_DEBUG.DIM_CUSTOMERS c JOIN ANALYTICS.ANALYTICS_DEBUG.FCT_ORDERS o ON c.CUSTOMER_ID = o.CUSTOMER_ID GROUP BY c.CUSTOMER_ID, o.STATUS
CREATE TABLE `Blogs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_StoryList` varchar(1000) DEFAULT NULL, `user_title` varchar(1000) DEFAULT NULL, `ParticipantClientId` int(11) NOT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, PRIMARY KEY (`id`), KEY `ParticipantClientId` (`ParticipantClientId`), CONSTRAINT `blogs_ibfk_1` FOREIGN KEY (`ParticipantClientId`) REFERENCES `Participants` (`client_id`) ON DELETE NO ACTION ON UPDATE CASCADE ); CREATE TABLE `Participants` ( `client_id` int(11) NOT NULL AUTO_INCREMENT, `user_First_name` varchar(255) DEFAULT NULL, `user_Last_name` varchar(255) DEFAULT NULL, `user_email` varchar(255) DEFAULT NULL, `user_bio_info` varchar(1000) DEFAULT NULL, `user_pic_profile` varchar(255) DEFAULT NULL, `user_password` varchar(255) DEFAULT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, PRIMARY KEY (`client_id`) ); CREATE TABLE `rec_atts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_rec_att` varchar(1000) DEFAULT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `ParticipantClientId` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `ParticipantClientId` (`ParticipantClientId`), CONSTRAINT `rec_atts_ibfk_1` FOREIGN KEY (`ParticipantClientId`) REFERENCES `Participants` (`client_id`) ON DELETE NO ACTION ON UPDATE CASCADE ); CREATE TABLE `rec_eves` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_rec_eve` varchar(1000) DEFAULT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `ParticipantClientId` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `ParticipantClientId` (`ParticipantClientId`), CONSTRAINT `rec_eves_ibfk_1` FOREIGN KEY (`ParticipantClientId`) REFERENCES `Participants` (`client_id`) ON DELETE NO ACTION ON UPDATE CASCADE ) ; CREATE TABLE `rec_foods` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_rec_food` varchar(1000) DEFAULT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `ParticipantClientId` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `ParticipantClientId` (`ParticipantClientId`), CONSTRAINT `rec_foods_ibfk_1` FOREIGN KEY (`ParticipantClientId`) REFERENCES `Participants` (`client_id`) ON DELETE NO ACTION ON UPDATE CASCADE ); CREATE TABLE `user_locations` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_location` varchar(1000) DEFAULT NULL, `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `ParticipantClientId` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `ParticipantClientId` (`ParticipantClientId`), CONSTRAINT `user_locations_ibfk_1` FOREIGN KEY (`ParticipantClientId`) REFERENCES `Participants` (`client_id`) ON DELETE NO ACTION ON UPDATE CASCADE ) ; CREATE TABLE `location_food` ( `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `client_id_food` int(11) NOT NULL, `ParticipantClientId` int(11) NOT NULL, PRIMARY KEY (`client_id_food`,`ParticipantClientId`), KEY `ParticipantClientId` (`ParticipantClientId`), CONSTRAINT `location_food_ibfk_1` FOREIGN KEY (`client_id_food`) REFERENCES `user_locations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `location_food_ibfk_2` FOREIGN KEY (`ParticipantClientId`) REFERENCES `rec_foods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ); CREATE TABLE `participant_food` ( `createdAt` datetime NOT NULL, `updatedAt` datetime NOT NULL, `ParticipantClientId` int(11) NOT NULL, `recFoodId` int(11) NOT NULL, PRIMARY KEY (`ParticipantClientId`,`recFoodId`), KEY `recFoodId` (`recFoodId`), CONSTRAINT `participant_food_ibfk_1` FOREIGN KEY (`ParticipantClientId`) REFERENCES `Participants` (`client_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `participant_food_ibfk_2` FOREIGN KEY (`recFoodId`) REFERENCES `rec_foods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ); CREATE TABLE `location_Name_Codes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `location_name` varchar(255) DEFAULT NULL, `location_codes` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) );
create table emp15(id int, name varchar(50), salary int); insert into emp15 values (1, 'a', 10000); insert into emp15 values (2, 'b', 20000); insert into emp15 values (3, 'c', 30000); insert into emp15 values (4, 'd', 15000); insert into emp15 values (5, 'e', 18000); create table emp10(id int, name varchar(50), age int); insert into emp10 values (4, 'a', 10); insert into emp10 values (5, 'b', 20); insert into emp10 values (32, 'c', 30); insert into emp10 values (43, 'd', 15); insert into emp10 values (56, 'e', 20); -- Aggregate function select count(salary) from emp15; select avg(salary) from emp15; select sum(salary) from emp15; select min(salary) from emp15; select max(salary) from emp15; -- Single View select '----------------------------------'; select '--------- Single View ------------'; create view data as select id, name from emp15 where id < 3; select * from data; -- Multiple view select '----------------------------------'; select '--------- Multiple View -----------'; create view test as select emp15.Name, emp15.salary, emp10.age from emp10, emp15 where emp10.name == emp15.name; select * from test;
SELECT DISTINCT product.name, product.id, product.image, favorites.customerid FROM product INNER JOIN favorites ON product.id = favorites.productid;
insert into department (id, title, description, short_description, parent_id) values(1, "Electronics", "Lorem Ipsum", "Lorem"); insert into department (id, title, description, short_description, parent_id) values(2, "Food", "All you can eat", "eat"); insert into department (id, title, description, short_description, parent_id) values(3, "Computer", "Gaming", "Game", 1); insert into department (id, title, description, short_description, parent_id) values(4, "Phones", "Used to make phone calls", "Calls", 1); insert into department (id, title, description, short_description, parent_id) values(5, "Tablets", "Intermediate between computers and phones", "Give it to your child", 1); insert into department (id, title, description, short_description, parent_id) values(6, "Candy", "Sugar for your sweet tooth", "Sugar", 2); insert into department (id, title, description, short_description, parent_id) values(7, "Meat", "grass-fed beef and tender chicken", "protein", 2); insert into department (id, title, description, short_description, parent_id) values(8, "Pasta", "the finest pasta directly from Italy", "carbs", 2); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(1, "Fast cmputer", "Fast computer from Apple", 0, "MacBook Pro", 1, 10, 11000.99, 13000.59, 1, 3); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(2, "Slow computer", "Slow computer from lenovo", 1, "Lenovo 1323", 1, 10, 4000.99, 5000.99, 0.7, 3); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(3, "smart phone", "Apples new smart phone Iphone X", 0, "Iphone X", 1, 100, 8000.99, 10000, 1, 4); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(4, "Smart tablet", "Apples new tablet!", 0, "Ipad 7", 0, 0,4000, 4999.99, 1, 5); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(5, "Sweet and sour", "Jolly ranchers in all flavours", 1, "Jolly Ranchers", 1, 1000, 8, 10, 0.9, 6); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(6, "Great for cristmas", "strawberry flavoured marshmellows", 1, "Santa foam", 1, 1000, 8, 10, 0.9, 6); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(7, "grade A Beef", "Made from cow", 0, "Sirloin", 0, 0, 60, 100, 1, 7); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(8, "Grade A Chicken", "'swedish chicken", 0, "Chicken breast", 1, 50, 40, 60.99, 1, 7); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(9, "Grade A Pasta", "Made in Italy", 0, "fettuccine", 1, 100, 15, 25, 1, 8); insert into product (Product_id, Short_description, Description, Featured, Title, Available, Stock_quantity, Price_without_tax, price_with_tax, Discount, department_id) values(10, "Grade B Pasta", "Made in Italy", 0, "Pappardelle", 1, 124, 13, 20.99, 1, 8); insert into user (ID, newsletter, password, phone_number, email, address, name) values(1, 0, "ABC123", 0701324545, "baba@live.se", "Grändvägen 123", "Adam Adamsson"); insert into user (ID, newsletter, password, phone_number, email, address, name) values(2, 1, "HEJHEH123", 0708493022, "Fredrik_innebandy_fotboll@live.se", "Vägens Gränd 321", "Greta Hejsson"); insert into review (score, user_review, user_ID, product_id) values(5, "Best Pasta very good",1, 9); insert into review (score, user_review, user_ID, product_id) values(1, "Meh, I dont like pasta",2, 9); INSERT INTO `fall17_project_it21`.Orders (`id`, `tracking_number`, `date_of_last_change`, `order_date`, `order_status`, `payment_reference`, `user_id`) VALUES ('1', '123', '20171204', '20171204', 'Pending', '12345', '1'); insert into orderdetails(price, quantity, order_id, product_id) values(25, 100, 1, 9); INSERT INTO fall17_project_it21.Orders (id, tracking_number, date_of_last_change, order_date, order_status, payment_reference, user_id) VALUES ('2', '321', '2017-12-03', '2017-12-02', 'Pending', 'VISA', '1'); INSERT INTO orderdetails(price, quantity, order_id, product_id) VALUES (60.99, 2, 2, 8); INSERT INTO fall17_project_it21.Orders (id, tracking_number, date_of_last_change, order_date, order_status, payment_reference, user_id) VALUES ('3', '524', '2017-12-02', '2017-12-01', 'Pending', 'Mastercard', '2'); INSERT INTO orderdetails(price, quantity, order_id, product_id) VALUES (10000, 1, 3, 3); INSERT INTO fall17_project_it21.Orders (id, tracking_number, date_of_last_change, order_date, order_status, payment_reference, user_id) VALUES ('4', '5444', '2017-12-02', '2017-12-01', 'Pending', 'Mastercard', '2'); INSERT INTO orderdetails(price, quantity, order_id, product_id) VALUES (10000, 2, 4, 3); /* QUERRIES • Welcome text for the homepage*/ select Welcome_text from Homepage; /*• List of the top level departments with fields needed for the homepage*/ select title, short_description from Department where id = 1 OR id = 2; /*• List of the featured products with fields needed for the homepage*/ select title, stock_quantity, discount, (price_without_tax*tax*discount) AS CurrentRetailprice from Product where featured = 1; /*• Given a product, list all keyword-related products*/ select distinct Product.title, Product.product_id, a.keyword_id from Product join Related a on Product.product_id = a.product_id where a.keyword_id in (select keyword_id from Related b where b.product_id = 2) AND NOT a.product_id = 2 group by Product.title; /*• Given an department, list of all its products (title, short description, current retail price) with their average rating*/ SELECT distinct Product.title, Product.short_description, (Product.tax*Product.price_without_tax*Product.discount) AS CurrentRetailprice, avg(Review.score) from Product left join Review on Product.product_id= Review.product_id where department_id = 8 group by Product.title; /*• List of all products on sale sorted by the discount percentage (starting with the biggest discount)*/ SELECT * FROM Product WHERE discount > 0.0 AND discount < 1 ORDER BY discount ASC; /*• List of all new orders sorted by the order date (id, order date, customer’s name and the city, and the total price)*/ SELECT Orders.id, Orders.order_date, User.firstname, User.lastname, User.city, SUM(Orderdetails.price*Orderdetails.quantity) AS Totalprice FROM Orders, User, Orderdetails WHERE Orderdetails.order_id = Orders.id AND Orders.user_id = User.id AND Orders.order_status = 'Order Recieved' ORDER BY order_date DESC; /*• 10 best-selling products (in last 30 days)*/ SELECT Product.title, Orders.order_date, SUM(Orderdetails.quantity) AS MostSold FROM Orders, Orderdetails, Product WHERE DATE_ADD(Orders.order_date, INTERVAL 30 DAY) >= CURDATE() AND Orderdetails.order_id = Orders.id AND Orderdetails.product_id = Product.product_id GROUP BY Product.title ORDER BY SUM(quantity) DESC LIMIT 10;
DROP TABLE IF EXISTS chat; DROP TABLE IF EXISTS friendships; DROP TABLE IF EXISTS users; CREATE TABLE users( id SERIAL PRIMARY KEY, name VARCHAR(200) NOT NULL, surname VARCHAR(200) NOT NULL, email VARCHAR(200) NOT NULL UNIQUE, password VARCHAR(100) NOT NULL, url VARCHAR(300), bio VARCHAR(600) ); SELECT * FROM users; CREATE TABLE friendships( id SERIAL PRIMARY KEY, sender_id INT NOT NULL REFERENCES users(id), receiver_id INT NOT NULL REFERENCES users(id), status INT NOT NULL DEFAULT 1 ); CREATE TABLE chat( id SERIAL PRIMARY KEY, sender_id INT NOT NULL REFERENCES users(id), message VARCHAR(5000) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
DROP owned BY l31621; CREATE TABLE questionarios( idQuest int, NomeQuest varchar(255), tamanhoQuest int, PRIMARY KEY(idQuest) ); CREATE TABLE Perguntas( idQuest int, idPergunta int, NomePergunta varchar(255), total int, quantP int, PRIMARY KEY(idQuest, idPergunta), FOREIGN KEY(idQuest) REFERENCES questionarios(idQuest) ON DELETE CASCADE ); CREATE TABLE QuantQuest( curr int, PRIMARY KEY(curr) ); INSERT INTO QuantQuest VALUES (0); SELECT table_name FROM information_schema.tables WHERE table_schema='public' AND table_type='BASE TABLE';
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 07, 2021 at 06:05 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `new_time_project` -- -- -------------------------------------------------------- -- -- Table structure for table `departments` -- CREATE TABLE `departments` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `departments` -- INSERT INTO `departments` (`id`, `name`, `created_at`, `updated_at`) VALUES (1, 'HR', NULL, '2021-01-06 06:46:59'), (2, 'Employee', NULL, NULL), (4, 'Clark', NULL, NULL), (5, 'Computer', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `failed_jobs` -- CREATE TABLE `failed_jobs` ( `id` bigint(20) UNSIGNED NOT NULL, `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `groups` -- CREATE TABLE `groups` ( `id` bigint(20) UNSIGNED NOT NULL, `grp_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `details` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `groups` -- INSERT INTO `groups` (`id`, `grp_name`, `status`, `details`, `_token`, `_method`, `created_at`, `updated_at`) VALUES (1, 'Science', 'Engineer', 'Latest collection of English status to express your feelings and situation on Whatsapp. · I\'m born to express, not to impress. · To success in life... · My real smile .', NULL, NULL, NULL, NULL), (2, 'Commerce', 'Banker', 'Im trying to send a call using ajax but in Chrome it is rising error but in firefox there is no error. But still it can\'t calling the method.', NULL, NULL, NULL, NULL), (3, 'Arts', 'Teacher', 'Chrome it is rising error but in firefox there is no error. But still it can\'t calling the method.', NULL, NULL, NULL, NULL), (4, 'Doctor', 'Admin', 'Chrome it is rising error but in firefox there is no error. But still it can\'t calling the method.', NULL, NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2014_10_12_200000_add_two_factor_columns_to_users_table', 1), (4, '2019_08_19_000000_create_failed_jobs_table', 1), (5, '2019_12_14_000001_create_personal_access_tokens_table', 1), (6, '2021_01_03_183603_create_sessions_table', 1), (7, '2021_01_03_191446_create_usercategorys_table', 2), (8, '2021_01_04_115936_create_groups_table', 3), (9, '2021_01_06_013656_create_departments_table', 4), (10, '2021_01_06_130712_create_userdetails_table', 5), (11, '2021_01_06_221426_create_userdetails_table', 6); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `personal_access_tokens` -- CREATE TABLE `personal_access_tokens` ( `id` bigint(20) UNSIGNED NOT NULL, `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `tokenable_id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, `abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `last_used_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `sessions` -- CREATE TABLE `sessions` ( `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` bigint(20) UNSIGNED DEFAULT NULL, `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_agent` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `payload` text COLLATE utf8mb4_unicode_ci NOT NULL, `last_activity` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `sessions` -- INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES ('24fwyzZwkm6lJE8HGSqsFQkRYgTMUDoOnogYXAGl', 3, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', 'YTo2OntzOjY6Il90b2tlbiI7czo0MDoiTlNqcUJBV1F2QU9BOGp2cExzUkxsTjVGT3N6NXpka2VUa25EdVptZyI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzM6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC91c2VyZGV0YWlscyI7fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjM7czoxNzoicGFzc3dvcmRfaGFzaF93ZWIiO3M6NjA6IiQyeSQxMCRWOXZ2VnViejUxcUdIVHdoU1JSdk0uYnlmeXNhTW9DWklJcEVNTE56Y3Z5ZGhVY1pkdWd3dSI7czoyMToicGFzc3dvcmRfaGFzaF9zYW5jdHVtIjtzOjYwOiIkMnkkMTAkVjl2dlZ1Yno1MXFHSFR3aFNSUnZNLmJ5ZnlzYU1vQ1pJSXBFTUxOemN2eWRoVWNaZHVnd3UiO30=', 1609995861); -- -------------------------------------------------------- -- -- Table structure for table `usercategorys` -- CREATE TABLE `usercategorys` ( `id` bigint(20) UNSIGNED NOT NULL, `cat_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `details` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `_token` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` datetime NOT NULL DEFAULT current_timestamp(), `updated_at` datetime NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `usercategorys` -- INSERT INTO `usercategorys` (`id`, `cat_name`, `details`, `_token`, `_method`, `created_at`, `updated_at`) VALUES (1, 'Teacher', 'trying to send a call using ajax but in Chrome it is rising error but in firefox there is no error. But still it can\'t calling the method.', NULL, NULL, '2021-01-06 12:47:37', '2021-01-06 12:47:37'), (2, 'Lecturer', 'trying to send a call using ajax but in Chrome it is rising error but in firefox there is no error. But still it can\'t calling the method.', NULL, NULL, '2021-01-06 12:48:10', '2021-01-06 12:48:10'), (3, 'Admin', 'The following table explains the REST error response elements. ... Error Code, Description, HTTP Status Code', NULL, NULL, '2021-01-06 12:48:36', '2021-01-06 12:48:36'), (4, 'Professor', 'The following table explains the REST error response elements. ... Error Code, Description, HTTP Status Code', NULL, NULL, '2021-01-06 12:48:56', '2021-01-06 12:48:56'), (5, 'Mobile', 'a relationship. some how it returns Undefined property: Illuminate\\Database\\Eloquent\\Relations\\HasMany::$id. I have no clue what i did wrong since i just started using laravel.', NULL, NULL, '2021-01-07 02:55:55', '2021-01-07 02:55:55'); -- -------------------------------------------------------- -- -- Table structure for table `userdetails` -- CREATE TABLE `userdetails` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `category_id` int(10) UNSIGNED NOT NULL, `group_id` int(10) UNSIGNED NOT NULL, `department_id` int(10) UNSIGNED NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `userdetails` -- INSERT INTO `userdetails` (`id`, `name`, `email`, `category_id`, `group_id`, `department_id`, `created_at`, `updated_at`) VALUES (1, 'Jahidul Pavel', 'jahidulku12092@gmail.com', 2, 1, 2, '2021-01-06 19:02:34', '2021-01-06 19:02:34'), (2, 'Jahidul Pavel', 'jahidulku12092@gmail.com', 1, 1, 1, '2021-01-06 19:07:49', '2021-01-06 19:07:49'), (3, 'Jahidul Pavel', 'jahidulku12092@gmail.com', 4, 3, 5, '2021-01-06 19:09:45', '2021-01-06 19:09:45'), (4, 'Jahidul Pavel', 'jahidulku12092@gmail.com', 4, 3, 5, '2021-01-06 19:10:33', '2021-01-06 19:10:33'), (8, 'Raihan Parvez', 'raihan@gmail.com', 2, 4, 1, '2021-01-07 05:04:21', '2021-01-07 05:04:21'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` bigint(20) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `two_factor_secret` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `two_factor_recovery_codes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `current_team_id` bigint(20) UNSIGNED DEFAULT NULL, `profile_photo_path` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `two_factor_secret`, `two_factor_recovery_codes`, `remember_token`, `current_team_id`, `profile_photo_path`, `created_at`, `updated_at`) VALUES (1, 'Jahidul Pavel', 'jahidulku12092@gmail.com', NULL, '$2y$10$/T/Y5d3pLWEQTpVPUKRWEe4cK0qeKkOVirkjsHE88YNjJi5FYeeb2', NULL, NULL, NULL, NULL, NULL, '2021-01-03 13:06:43', '2021-01-03 13:06:43'), (2, 'Pavel', 'pavel@gmail.com', NULL, '$2y$10$1iIGUnU5llqRqwHoQ5K5ou3VH3pvWlAd3g84FfRhZwrM3ZF.0ebwK', NULL, NULL, NULL, NULL, NULL, '2021-01-06 04:14:58', '2021-01-06 04:14:58'), (3, 'Raihan Parvez', 'raihan@gmail.com', NULL, '$2y$10$V9vvVubz51qGHTwhSRRvM.byfysaMoCZIIpEMLNzcvydhUcZdugwu', NULL, NULL, NULL, NULL, NULL, '2021-01-07 03:28:02', '2021-01-07 03:28:02'); -- -- Indexes for dumped tables -- -- -- Indexes for table `departments` -- ALTER TABLE `departments` ADD PRIMARY KEY (`id`); -- -- Indexes for table `failed_jobs` -- ALTER TABLE `failed_jobs` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`); -- -- Indexes for table `groups` -- ALTER TABLE `groups` ADD PRIMARY KEY (`id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `personal_access_tokens` -- ALTER TABLE `personal_access_tokens` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`), ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`); -- -- Indexes for table `sessions` -- ALTER TABLE `sessions` ADD PRIMARY KEY (`id`), ADD KEY `sessions_user_id_index` (`user_id`), ADD KEY `sessions_last_activity_index` (`last_activity`); -- -- Indexes for table `usercategorys` -- ALTER TABLE `usercategorys` ADD PRIMARY KEY (`id`); -- -- Indexes for table `userdetails` -- ALTER TABLE `userdetails` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `departments` -- ALTER TABLE `departments` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `failed_jobs` -- ALTER TABLE `failed_jobs` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `groups` -- ALTER TABLE `groups` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `personal_access_tokens` -- ALTER TABLE `personal_access_tokens` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `usercategorys` -- ALTER TABLE `usercategorys` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `userdetails` -- ALTER TABLE `userdetails` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; COMMIT; /*!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 */;
delete from blogposts where id = $1 returning *
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 22-07-2021 a las 05:49:50 -- Versión del servidor: 10.4.19-MariaDB -- Versión de PHP: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Base de datos: `universidad` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `cursos` -- CREATE TABLE `cursos` ( `Id` int(11) NOT NULL, `Nombre` varchar(200) NOT NULL, `Descripcion` varchar(1000) NOT NULL, `Imagen` varchar(1000) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `cursos` -- INSERT INTO `cursos` (`Id`, `Nombre`, `Descripcion`, `Imagen`) VALUES (58, 'php', 'prueba php', 'imagen.jpg'), (59, 'python', 'prueba python', 'imagen.jpg'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `rol` -- CREATE TABLE `rol` ( `id` int(11) NOT NULL, `Descripcion` varchar(250) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `rol` -- INSERT INTO `rol` (`id`, `Descripcion`) VALUES (1, 'Administrador'), (2, 'Cliente'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuarios` -- CREATE TABLE `usuarios` ( `Id` int(11) NOT NULL, `Nombre` varchar(250) NOT NULL, `Email` varchar(250) NOT NULL, `Contraseña` varchar(250) NOT NULL, `id_rol` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `usuarios` -- INSERT INTO `usuarios` (`Id`, `Nombre`, `Email`, `Contraseña`, `id_rol`) VALUES (1, 'Richard', 'rmenlat@hotmail.com', '123456', 1), (2, 'juan', 'juan@hotmail.com', '123456', 2); -- -- Índices para tablas volcadas -- -- -- Indices de la tabla `cursos` -- ALTER TABLE `cursos` ADD PRIMARY KEY (`Id`); -- -- Indices de la tabla `rol` -- ALTER TABLE `rol` ADD PRIMARY KEY (`id`); -- -- Indices de la tabla `usuarios` -- ALTER TABLE `usuarios` ADD PRIMARY KEY (`Id`), ADD KEY `id_rol` (`id_rol`); -- -- AUTO_INCREMENT de las tablas volcadas -- -- -- AUTO_INCREMENT de la tabla `cursos` -- ALTER TABLE `cursos` MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60; -- -- AUTO_INCREMENT de la tabla `rol` -- ALTER TABLE `rol` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT de la tabla `usuarios` -- ALTER TABLE `usuarios` MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla `usuarios` -- ALTER TABLE `usuarios` ADD CONSTRAINT `usuarios_ibfk_1` FOREIGN KEY (`id_rol`) REFERENCES `rol` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!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 */;
/* SQL practice in Udacity's 'Programming for Data Science' Nanodegree Program SQL > Lesson 8 > Project: Investigate the 'Sakila DVD rental database' Section 13: Question Set #2 Question 3: Finally, for each of these top 10 paying customers, I would like to find out the difference across their monthly payments during 2007. Please go ahead and write a query to compare the payment amounts in each successive month. Repeat this for each of these 10 paying customers. Also, it will be tremendously helpful if you can identify the customer name who paid the most difference in terms of payments. */ WITH payment_details AS ( SELECT c.first_name || ' ' || c.last_name AS full_name, DATE_TRUNC('month', p.payment_date) AS pay_month, DATE_PART('year', p.payment_date) AS pay_year, p.amount AS amount FROM customer c JOIN payment p ON c.customer_id = p.customer_id ), top_customer AS ( SELECT DISTINCT pd.full_name AS full_name, SUM(pd.amount) OVER(PARTITION BY pd.full_name) FROM payment_details pd ORDER BY 2 DESC LIMIT 10 ), monthly_details AS ( SELECT tc.full_name, pd.pay_month, SUM(pd.amount) AS total_monthly_pay FROM payment_details pd JOIN top_customer tc ON pd.full_name = tc.full_name GROUP BY 1, 2 ORDER BY 1, 2) SELECT full_name, pay_month, total_monthly_pay, LAG(total_monthly_pay) OVER ordered_window AS lag_value, (total_monthly_pay - LAG(total_monthly_pay) OVER ordered_window) AS monthly_pay_diff FROM monthly_details WINDOW ordered_window AS (PARTITION BY full_name ORDER BY pay_month) ORDER BY 5 DESC NULLS LAST LIMIT 1; /* IMPORTANT NOTE: When ORDERED rows with NULL values in Descending order, NULLs are placed first before higher values, hence in the last but one line in the above query, used 'ORDER BY 5 DESC NULLS LAST' command to send all NULL values to bottom of the resulting table. REFER the below link for furthur understanding: https://stackoverflow.com/questions/26949596/how-can-i-make-null-values-be-considered-as-max-in-sql */ /* Problem / Drawback: Though the resulting solution is correct in this context, but sometimes there may two person with the same MAX value. In the case, using LIMIT 1 will not produce the precise solution. */ /*--------------------- Modified and Rectified Solution ---------------------*/ WITH payment_details AS ( SELECT c.first_name || ' ' || c.last_name AS full_name, DATE_TRUNC('month', p.payment_date) AS pay_month, DATE_PART('year', p.payment_date) AS pay_year, p.amount AS amount FROM customer c JOIN payment p ON c.customer_id = p.customer_id ), top_customer AS ( SELECT DISTINCT pd.full_name AS full_name, SUM(pd.amount) OVER(PARTITION BY pd.full_name) FROM payment_details pd ORDER BY 2 DESC LIMIT 10 ), monthly_details AS ( SELECT tc.full_name, pd.pay_month, SUM(pd.amount) AS total_monthly_pay FROM payment_details pd JOIN top_customer tc ON pd.full_name = tc.full_name GROUP BY 1, 2 ORDER BY 1, 2), lag_diff AS ( SELECT md.full_name, md.pay_month, md.total_monthly_pay, LAG(md.total_monthly_pay) OVER ordered_window AS lag_value, (md.total_monthly_pay - LAG(md.total_monthly_pay) OVER ordered_window) AS monthly_pay_diff FROM monthly_details md WINDOW ordered_window AS (PARTITION BY md.full_name ORDER BY md.pay_month) ORDER BY 1, 2) SELECT * FROM lag_diff WHERE monthly_pay_diff = (SELECT MAX(monthly_pay_diff) FROM lag_diff); /* Since we used sub query to find MAX value and used it to display all rows with the MAX values, if there were more than one row with same MAX value, all rows with the MAX value will be displayed. REFER the below link for furthur understanding: https://stackoverflow.com/questions/22278769/how-to-use-max-for-multiple-occurrences-of-max-values-in-sql */
-- MySQL dump 10.13 Distrib 5.7.24, for osx10.14 (x86_64) -- -- Host: localhost Database: hackerrank -- ------------------------------------------------------ -- Server version 5.7.24 /*!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 `bst` -- DROP TABLE IF EXISTS `bst`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `bst` ( `n` int(11) NOT NULL, `p` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `bst` -- LOCK TABLES `bst` WRITE; /*!40000 ALTER TABLE `bst` DISABLE KEYS */; INSERT INTO `bst` VALUES (1,2),(3,2),(6,8),(9,8),(2,5),(8,5),(5,NULL); /*!40000 ALTER TABLE `bst` 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 2019-03-30 10:14:04
create database cactidb; grant all privileges on cactidb.* to usuario@'localhost' identified by '**Un1tec**'; flush privileges; exit
/* Navicat Premium Data Transfer Source Server : myRole Source Server Type : MySQL Source Server Version : 50725 Source Host : 192.168.48.14:3306 Source Schema : training_db_xhr Target Server Type : MySQL Target Server Version : 50725 File Encoding : 65001 Date: 19/08/2020 17:56:46 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for role -- ---------------------------- DROP TABLE IF EXISTS `role`; CREATE TABLE `role` ( `roleid` int(11) NOT NULL AUTO_INCREMENT COMMENT '角色编号', `rolename` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色内容', PRIMARY KEY (`roleid`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of role -- ---------------------------- INSERT INTO `role` VALUES (8, '程序员'); INSERT INTO `role` VALUES (11, '管理员'); INSERT INTO `role` VALUES (12, 'hr'); INSERT INTO `role` VALUES (13, '架构师'); INSERT INTO `role` VALUES (14, 'boss'); -- ---------------------------- -- Table structure for user -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `userid` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户编号', `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名', `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', PRIMARY KEY (`userid`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of user -- ---------------------------- INSERT INTO `user` VALUES (30, '彩和', '123456'); INSERT INTO `user` VALUES (31, '华仔', '123456'); INSERT INTO `user` VALUES (33, '浩然', '123456'); INSERT INTO `user` VALUES (34, '荣建', '123456'); INSERT INTO `user` VALUES (35, '振波', '123456'); INSERT INTO `user` VALUES (36, '帅康', '123456'); -- ---------------------------- -- Table structure for user_role -- ---------------------------- DROP TABLE IF EXISTS `user_role`; CREATE TABLE `user_role` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户角色关联编号', `userid` int(11) NULL DEFAULT NULL COMMENT '用户编号', `roleid` int(11) NULL DEFAULT NULL COMMENT '角色编号', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of user_role -- ---------------------------- INSERT INTO `user_role` VALUES (9, 31, 8); INSERT INTO `user_role` VALUES (11, 31, 8); INSERT INTO `user_role` VALUES (13, 30, 8); INSERT INTO `user_role` VALUES (14, 33, 11); INSERT INTO `user_role` VALUES (15, 35, 8); INSERT INTO `user_role` VALUES (16, 36, 8); INSERT INTO `user_role` VALUES (17, 33, 13); SET FOREIGN_KEY_CHECKS = 1;
drop table users CASCADE ; drop table forum CASCADE ; drop table thread CASCADE ; drop table messages CASCADE ; drop table votes CASCADE ; drop table usersForums CASCADE ; DROP INDEX IF EXISTS indexUniqueEmail; DROP INDEX IF EXISTS indexUniqueNickname; DROP INDEX IF EXISTS indexUniqueNicknameLow; DROP INDEX IF EXISTS indexForumsUser; DROP INDEX IF EXISTS indexUniqueSlugForums; DROP INDEX IF EXISTS indexThreadUser; DROP INDEX IF EXISTS indexThreadForum; DROP INDEX IF EXISTS indexUniqueSlugThread; DROP INDEX IF EXISTS indexPostAuthor; DROP INDEX IF EXISTS indexPostForum; DROP INDEX IF EXISTS indexPostThread; DROP INDEX IF EXISTS indexPostCreated; DROP INDEX IF EXISTS indexPostThreadCreateId; DROP INDEX IF EXISTS indexPostParentThreadId; DROP INDEX IF EXISTS indexPostIdThread; DROP INDEX IF EXISTS indexPostThreadPath; DROP INDEX IF EXISTS indexPostPath; DROP INDEX IF EXISTS indexUsersForumsUser; DROP INDEX IF EXISTS indexUsersForumsForum; DROP INDEX IF EXISTS indexUsersForumsUserLow;
CREATE TABLE ip ( id BIGINT PRIMARY KEY NOT NULL AUTO_INCREMENT, address VARCHAR(15) NOT NULL, dnsRecordId BIGINT NOT NULL, FOREIGN KEY (dnsRecordId) REFERENCES dnsrecord (id) );
use db1; drop table if exists `student`; CREATE TABLE `student` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `name` varchar(16) NOT NULL COMMENT '姓名', `age` int(11) NOT NULL COMMENT '年龄', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; use db2; drop table if exists `teacher`; CREATE TABLE `teacher` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `name` varchar(16) NOT NULL COMMENT '姓名', `student_cnt` int(11) NOT NULL COMMENT '所带学生数量', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 28, 2021 at 05:07 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 8.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `demoeshop` -- -- -------------------------------------------------------- -- -- Table structure for table `product` -- CREATE TABLE `product` ( `id` int(11) NOT NULL, `model` varchar(100) NOT NULL, `manufacturer` varchar(100) NOT NULL, `picture` varchar(512) NOT NULL, `price` double NOT NULL, `times_sold` int(11) NOT NULL, `category` varchar(100) NOT NULL, `description` text NOT NULL, `in_stock` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `product` -- INSERT INTO `product` (`id`, `model`, `manufacturer`, `picture`, `price`, `times_sold`, `category`, `description`, `in_stock`) VALUES (1, 'Aspire 5 A515-46-R14K Slim Laptop', 'Acer', '71AmKW4yuMS._AC_UY218_.jpg', 364.76, 4, 'PC', 'Acer Aspire 5 A515-46-R14K Slim Laptop | 15.6\" Full HD IPS | AMD Ryzen 3 3350U Quad-Core Mobile Processor | 4GB DDR4 | 128GB NVMe SSD | WiFi 6 | Backlit KB | Amazon Alexa | Windows 10 Home', 100), (2, 'Chromebook 14 Laptop', 'HP', '81b6IIclRfS._AC_UY218_.jpg', 269.99, 5, 'homepc', 'HP Chromebook 14 Laptop, Intel Celeron N4000 Processor, 4 GB RAM, 32 GB eMMC, 14? HD Display', 0), (3, '15 Laptop', 'HP', '81skV7BufjL._AC_UY218_.jpg', 693.99, 6, 'Laptop', 'HP 15 Laptop, 11th Gen Intel Core i5-1135G7 Processor, 8 GB RAM, 256 GB SSD Storage, 15.6? Full HD IPS', 100), (4, '2020 Flagship HP 14 Chromebook Laptop 123', 'HP 1132', '817Y3zdhTXL._AC_UY218_.jpg', 190.59, 10, 'Laptop', '2020 Flagship HP 14 Chromebook Laptop Computer 14\" HD SVA Anti-Glare Display Intel Celeron Processor 4GB', 59), (7, 'VivoBook 15 Thin and Light Laptop', 'Asus', '81fstJkUlaL._AC_UY218_.jpg', 400.94, 44, 'Laptop', 'ASUS VivoBook 15 Thin and Light Laptop, 15.6? FHD Display, Intel i3-1005G1 CPU, 8GB RAM, 128GB SSD,', 132); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `ID` bigint(20) NOT NULL, `firstname` varchar(100) DEFAULT NULL, `lastname` varchar(100) DEFAULT NULL, `email` varchar(100) NOT NULL, `password` varchar(100) NOT NULL, `isAdmin` tinyint(4) NOT NULL, `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `verified` tinyint(4) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `users` -- INSERT INTO `users` (`ID`, `firstname`, `lastname`, `email`, `password`, `isAdmin`, `created`, `verified`) VALUES (9, 'admin', 'admin', 'admin@admin.com', '$2y$10$tFJbYkRKdqCRTXi1/3SR5uvI3KLEfpu0UY/DG3P9qye933CRn8AZa', 1, '2021-07-26 21:04:21', 0), (12, 'Testing', 'Testing', 'Testing@testing.com', '$2y$10$p796Zj4WZw6T9MhN9rhJpOcoHCtTQ3liy9Kzod0lGMAApGZnPsBeS', 0, '2021-07-28 14:34:16', 0); -- -- Indexes for dumped tables -- -- -- Indexes for table `product` -- ALTER TABLE `product` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`ID`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `product` -- ALTER TABLE `product` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `ID` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; COMMIT; /*!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 */;
SELECT TOP(2) DepositGroup FROM WizzardDeposits GROUP By DepositGroup ORDER BY AVG(MagicWandSize)
http://www.sqlite.org/inmemorydb.html http://blog.jobbole.com/92802/ .show .mode column .headers on select type, name, tbl_name, rootpage, sql from sqlite_master where type = 'table'; pragma table_info(ta); cid name type notnull dflt_value pk; SELECT FROM table_name WHERE column GLOB '*XXXX?'; create trigger `t1` after insert on `src` begin insert into `bak`(`id`) values(new.`id`); end; create trigger `t2` after update on `src` begin update `bak` set `id` = new.`id` where `id` = old.`id`;end; create trigger `t3` after delete on `src` begin insert into `del`(`id`) values(old.`id`); delete from `bak` where `id` = old.`id`; end; CREATE TRIGGER [BEFORE|AFTER] [INSERT|UPDATE|DELETE] ON <tableName> FOR EACH ROW BEGIN --do something END; text select typeof('a'); integer select typeof(1); real select typeof(0.3); null select typeof(null); blob select typeof(x'3000');
-- oracle select a.animal_id , a.name from ( select ao.animal_id , ao.name , ao.datetime - ai.datetime as period from animal_outs ao join animal_ins ai on ao.animal_id = ai.animal_id order by period desc ) a where 1 = 1 and rownum <= 2 ; -- mysql select ao.animal_id , ao.name from animal_outs ao join animal_ins ai on ao.animal_id = ai.animal_id order by ao.datetime - ai.datetime desc limit 2 ;
-- phpMyAdmin SQL Dump -- version 4.6.3 -- https://www.phpmyadmin.net/ -- -- Servidor: localhost -- Tiempo de generación: 07-02-2017 a las 15:24:54 -- Servidor: localhost -- Versión de PHP: 5.6.15 -- -------------------------------------------------------- -- -- Volcado de datos para la tabla `fos_user` -- INSERT INTO `fos_user` (`id`, `username`, `username_canonical`, `email`, `email_canonical`, `enabled`, `salt`, `password`, `last_login`, `locked`, `expired`, `expires_at`, `confirmation_token`, `password_requested_at`, `roles`, `credentials_expired`, `credentials_expire_at`) VALUES (1, 'admin', 'admin', 'segundo@kiupa.com', 'segundo@kiupa.com', 1, 'iq1wk3hdko0kk8sgwgcwckoow0cosgo', '$2y$13$iq1wk3hdko0kk8sgwgcwceWqlvl.Q12bdCEBHb1JVGnxbhzCrqcR6', '2017-02-01 19:17:32', 0, 0, NULL, NULL, NULL, 'a:1:{i:0;s:10:"ROLE_ADMIN";}', 0, NULL), (2, 'user', 'user', 'segundo@kiupa.es', 'segundo@kiupa.es', 1, '985rnqowqz8cc04o4g080cwokg0gswg', '$2y$13$985rnqowqz8cc04o4g080Oqa7if6QOYyrT69Fh6HihO1jXRh3.0TK', '2017-01-30 23:54:50', 0, 0, NULL, NULL, NULL, 'a:0:{}', 0, NULL); -- -------------------------------------------------------- -- -- Volcado de datos para la tabla `tipocomercio` -- INSERT INTO `tipocomercio` (`id`, `nombre`) VALUES (8, 'Abogados'), (1, 'Bares'), (6, 'Floristerías'), (7, 'Fontanería'), (5, 'Modas'), (3, 'Panaderías'), (2, 'Pinturas'), (4, 'Zapaterías'); -- -------------------------------------------------------- -- -- Volcado de datos para la tabla `tipoanuncio` -- INSERT INTO `tipoanuncio` (`id`, `nombre`) VALUES (1, 'Ayuntamiento'), (3, 'Deportes'), (2, 'Fallas'), (5, 'Navidad'), (4, 'Policía Local'), (6, 'Sin Clasificar'); -- -------------------------------------------------------- -- -- Volcado de datos para la tabla `persona` -- INSERT INTO `persona` (`id`, `nombre`, `apellido`, `edad`, `telefono`, `email`, `genero`, `catarroja`) VALUES (1, 'Antonio', 'Galvez', 41, 961272584, 'galvez@gmail.com', 'm', 1), (2, 'Manuel', 'Molinos', 53, 961261264, 'manuel.molinos@gmail.com', 'm', 1), (3, 'No', 'Asignado', 0, 0, 'null@null.null', 'm', 0), (4, 'Maruja', 'Pérez', 60, 961265837, 'panaderiaqmaru@maru.com', 'f', 0); INSERT INTO `buscar` (`id`, `tipoanuncio_id`, `criterio`, `fecha`) VALUES (7, 2, 'Pinturas', '04-01-2017'), (8, 1, 'Bares', '04-01-2017'), (9, 1, 'Bares', '08-01-2017'), (10, 5, 'Modas', '08-01-2017'), (11, 1, 'Bares', '08-01-2017'), (12, 2, 'Pinturas', '08-01-2017'), (13, 3, 'Panaderías', '08-01-2017'), (14, 2, 'Pinturas', '08-01-2017'), (15, 6, 'Floristerías', '08-01-2017'), (16, 8, 'Abogados', '08-01-2017'), (17, 1, 'Bares', '08-01-2017'), (18, 1, 'Bares', '28-01-2017'), (19, 3, 'Panaderías', '28-01-2017'), (20, 2, 'Pinturas', '28-01-2017'), (21, 3, 'Panaderías', '28-01-2017'), (22, 3, 'Panaderías', '30-01-2017'), (23, 3, 'Panaderías', '30-01-2017'), (24, 1, 'Bares', '30-01-2017'), (25, 3, 'Panaderías', '30-01-2017'), (26, 3, 'Panaderías', '30-01-2017'); INSERT INTO `anuncio` (`id`, `tipoanuncio_id`, `persona_id`, `fecha`, `titulo`, `texto`) VALUES (1, 1, NULL, '2017-02-01', 'Presentaciones de comisiones Falleras', 'En estos días se abre el plazo de inscripción de todos los falleros y falleras que quieran participar en este evento. Acudir al Ayuntamiento en horario de oficina para realizar el trámite. Es recomendable no dejarlo para último momento.'), (2, 4, NULL, '2017-03-01', 'Calles cortadas por Fallas', 'ATENCIÓN, Las calles del centro de la población estará cortadas de forma gradual por motivo de la instalación de los monumentos falleros, así como las carpas de algunos casales falleros. Desde la Policía Local les deseamos que disfruten de las fiestas. Seguiremos informando.'), (4, 5, NULL, '05-01-2017', 'Cabalgata de sus Majestades Los Reyes Magos.', 'Con motivo de la Cabalgata de sus Majestades Los Reyes Magos, se aconseja asistir a la misma en transporte público o caminando, a fin de no colapsar las calles. Esperemos que os dejen lo que les habéis pedido, y que os porteis bien.'), (5, 3, NULL, '06-01-2017', 'Partido de futbol en el polideportivo', 'El próximo domingo día 8 de enero de 2017, se celebrará un partido de futbol entre los colegios San José y Sant Pere. La entrada será de tan solo un Euro y lo recaudado será donado íntegramente a Cáritas. Esperamos su asistencia.'); -- -------------------------------------------------------- -- -- Volcado de datos para la tabla `comercio` -- INSERT INTO `comercio` (`id`, `tipocomercio_id`, `persona_id`, `posicion`, `nombre`, `direccion`, `telefono`, `web`, `mapa`, `foto`, `email`) VALUES (1, 1, 1, 1, 'Bocatería Gálvez', 'Av. Rambleta, 45', 961272584, 'http://www.galvez.com', '961272584', '961272584', 'galvez@gmail.com'), (2, 2, NULL, 1, 'Pinturas Sergio Bou', 'Av. Rambleta, 55', 961844121, 'http://wwwpinturassergio.com', '961844121', '961844121', 'pinturassergio@gmail.com'), (3, 1, NULL, 2, 'Bar Toni', 'C/ Torrente, 4', 987654321, 'http://www.bartoni.com', '987654321', '987654321', 'toni@gmail.com'), (4, 1, NULL, 3, 'Bar Tívoli', 'Camí Real, 102', 321654987, 'http://www.bartivoli.es', '321654987', '321654987', 'bartivoli@gamil.com'), (5, 1, NULL, 4, 'Bar Trini', 'C/ Museros, 10', 369258741, 'http://www.bartrini.es', '369258741', '369258741', 'bartrini@gmail.com'), (6, 1, NULL, 5, 'Bar Prueba', 'C/ Prueba, 3', 369874521, 'http://www.barprueba.com', '369874521', '369874521', 'barprueba@kiupa.com'), (7, 8, 1, 10, 'prueba10', 'Calle pruenba 10', 963326860, 'http://www.kiupa.com', '963326860', '963326860', 'segundo@kiupa.es'), (9, 8, 1, 15, 'Prueba_15', 'C/ Prueba_15', 363346860, 'http://www.kiupa.com', '363346860', '363346860', 'qwerty@qwerty'), (10, 3, 2, 1, 'Horno Bolleria Manuel Molinos', 'Carrer Constitució, 9, 46470 Catarroja, València', 961261264, 'http://www.hornomanuelmolinos.es', '961261264', '961261264', 'manuel.molinos@gmail.com'), (11, 3, 4, 2, 'Horno Pasteleria Maru', 'Pl. Mestre Iturbi, 9. 46470. CATARROJA, VALENCIA', 961265837, 'http://www.kiupa.com', '961265837', '961265837', 'panaderiaqmaru@maru.com');
CREATE TABLE BOOKDB.USER( ID NUMBER(20,0) NOT NULL, ROLE VARCHAR(64) NOT NULL, USERNAME VARCHAR(64) NOT NULL, PASSWORD VARCHAR(128) NOT NULL, ENABLED NUMBER(1,0) NOT NULL, PRIMARY KEY (ID) ); CREATE TABLE BOOKDB.SHARED( USER_ID NUMBER(20,0) NOT NULL, ALBUM_ID NUMBER(20,0) NOT NULL, PRIVILEGE VARCHAR(64) NOT NULL, PRIMARY KEY (USER_ID, ALBUM_ID) );
create table airLineCompany( ALid int primary key, airLineName varchar(45), registerDate datetime); create table Branch( address varchar(45), firstName varchar(45), LastName varchar(45), ALid int, branchid int primary key, foreign key (ALid) references airLineCompany (ALid) ); #shobe weak entity ast. # manager Last name sefate momayeze ast create table branch_tel( branchid int, tel int, constraint branch_tel_PK primary key (branchid,tel), constraint branch_tel_FK foreign key (branchid) references Branch(branchid)); create table airLineCompany_tel( ALid int, tel int, constraint branch_tel_PK primary key (ALid,tel), constraint branchid_tel_FK foreign key (ALid) references Branch(ALid)); create table mainOffice (officeid int primary key, firstname varchar(45), lastName varchar(45), address varchar(45), ALid int, foreign key (ALid) references airLineCompany(ALid)); create table mainOffice_tel (officeid int, mainOffice_tel int, constraint mainOffice_tel_pk primary key (officeid,mainOffice_tel), constraint mainOffice_tel_fk foreign key (officeid) references mainOffice(officeid)); create table specialist( specialistssn int primary key, firstname varchar(45), lastname varchar(45)); create table specialist_tels( tel int, specialistssn int, constraint specialist_tels_PK primary key (specialistssn,tel) , foreign key (specialistssn) REFERENCES specialist (specialistssn)); create table specialist_address( specialistssn int, address varchar(45), constraint specialist_add_PK primary key (specialistssn,address), foreign key (specialistssn) REFERENCES specialist(specialistssn)); create table airPlane( airplanename varchar(45) primary key, capacity int); create table trip( tripid int primary key, origin varchar(45), destination varchar(45), class varchar(45) check( class='business' or class= 'economy'), airplanename varchar(45), pilotname varchar(45), price decimal(10,2), ALid int, foreign key(ALid) references airlinecompany(ALid), foreign key(airplanename) references airplane(airplanename)); create table charterTrip( charterid int primary key, tripid int , goingtime datetime, backingtime datetime, goinglenghttime time, backinglenghttime time, foreign key(tripid) references Trip(tripid)); create table onewaytrip( onewaytrip int primary key, tripid int , triptime datetime, triplenghttime time, foreign key(tripid) references Trip(tripid)); create table verificationTripBySpecialist( verificationStatus varchar(45) check( verificationStatus='accepted' or verificationStatus= 'rejected' or verificationStatus='inprocess'), specialistssn int, tripid int, foreign key(tripid) references trip(tripid), foreign key(specialistssn) references specialist(specialistssn) , constraint verificationTripBySpecialist_pk primary key (tripid,specialistssn)); create table company ( enrollmentnum int primary key, comapanyname varchar(45), address varchar(100)); create table crecompany_tel( enrollmentnum int, tel int , foreign key(enrollmentnum) references company(enrollmentnum), constraint company_tel_pk primary key (enrollmentnum,tel)); #employee is weak entity create table employee ( firstname varchar(45), lastname varchar(45), enrollmentnum int, personalnum int, foreign key(enrollmentnum) references company(enrollmentnum), constraint cemployee_pk primary key (enrollmentnum,personalnum)); create table employee_tel( enrollmentnum int, personalnum int, tel int, constraint foreign key (enrollmentnum,personalnum) references employee(enrollmentnum,personalnum), constraint employee_tel_pk primary key (enrollmentnum,personalnum,tel)); create table customer( customerid int primary key, ssn int , firstname varchar(45), lastname varchar(45)); create table ticket( customerid int, ticketid int primary key, buytime datetime , personalnum int, enrollmentnum int, tripid int, constraint foreign key (enrollmentnum,personalnum) references employee(enrollmentnum,personalnum), constraint foreign key (customerid) references customer(customerid), foreign key (tripid) references trip(tripid) ); create table supportTeam( stid int primary key, firstname varchar(45), lastname varchar(45), onOroff boolean, #if it is 1 ,he is online else he is offline lastOnline datetime);# it is only for off status create table complaint( complaintid int primary key, stid int, subjectComplaint varchar(45), customerid int, sendTime datetime, answertime datetime, foreign key (stid) references supportTeam(stid), foreign key (customerid) references customer(customerid)); create table onlineAnswer( answerid int primary key, customerid int, sendTime datetime, #tavasote customer porside mishe answertime datetime, #tavasote suport team pasokh dade mishe stid int, subjectComplaint varchar(45), foreign key (stid) references supportTeam(stid), foreign key (customerid) references customer(customerid)); create table customer_tels( customerid int , tel int, foreign key (customerid) references customer(customerid), constraint customer_tels_PK primary key (customerid,tel) ); create table customer_add( customerid int , address int, foreign key (customerid) references customer(customerid), constraint customer_add_PK primary key (customerid,address) ); create table unregistered_customer( unc_id int primary key, customerid int, foreign key (customerid) references customer (customerid) ); create table registered_customer( rc_id int primary key, customerid int, fathername varchar(45), birthdate date, birthplace varchar(45), accountnumber int, timeRegistered datetime, paidway varchar(45) check( paidway='online' or paidway= 'account'), foreign key (customerid) references customer (customerid) );
-- カテゴリー insert into categories values (null, 35, 'はじめに', 1, 0, now(), 0, now()), (null, 35, '試合連絡', 2, 0, now(), 0, now()), (null, 35, '練習連絡', 3, 0, now(), 0, now()), (null, 35, '事務連絡', 4, 0, now(), 0, now()), (null, 35, 'その他', 5, 0, now(), 0, now()), (null, 35, '2014年度', 6, 0, now(), 0, now()), (null, 35, '2015年度', 7, 0, now(), 0, now()), (null, 35, '2016年度', 8, 0, now(), 0, now()), (null, 35, '2017年度', 9, 0, now(), 0, now()), (null, 35, '2018年度', 10, 0, now(), 0, now()), (null, 36, '練習連絡', 1, 0, now(), 0, now()), (null, 36, '試合連絡', 2, 0, now(), 0, now()), (null, 36, '試合結果 報告', 3, 0, now(), 0, now()), (null, 36, '事務連絡', 4, 0, now(), 0, now()), (null, 36, 'イベント', 5, 0, now(), 0, now()), (null, 36, '学校利用の注意事項', 6, 0, now(), 0, now()), (null, 36, 'はじめての方へ', 7, 0, now(), 0, now()), (null, 36, 'その他', 8, 0, now(), 0, now()), (null,37,'練習連絡',1,0,now(),0,now()), (null,37,'試合連絡',2,0,now(),0,now()), (null,37,'試合結果',3,0,now(),0,now()), (null,37,'事務連絡',4,0,now(),0,now()), (null,37,'はじめに',5,0,now(),0,now()), (null,37,'その他',6,0,now(),0,now()), (null,37,'2016年度(1年生)',7,0,now(),0,now()), (null,38,'事務連絡',1,0,now(),0,now()), (null,38,'試合結果',2,0,now(),0,now()), (null,38,'試合連絡',3,0,now(),0,now()), (null,38,'練習連絡',4,0,now(),0,now()), (null,38,'はじめに',5,0,now(),0,now()), (null,38,'その他',6,0,now(),0,now()), (null,39,'練習連絡',1,0,now(),0,now()), (null,39,'試合連絡',2,0,now(),0,now()), (null,39,'事務連絡',3,0,now(),0,now()), (null,39,'はじめに',4,0,now(),0,now()), (null,39,'その他',5,0,now(),0,now()), (null,40,'練習連絡',1,0,now(),0,now()), (null,40,'試合連絡',2,0,now(),0,now()), (null,40,'事務連絡',3,0,now(),0,now()), (null,40,'はじめに',4,0,now(),0,now()), (null,40,'その他',5,0,now(),0,now()) ; -- すべて既読に更新 insert ignore into post_responses select null, m.user_id, p.id post_id,1,0,0,0,now(),0,now() from posts p join members m on p.team_id=m.team_id where p.team_id=35 and m.team_id = 35 and m.user_id is not null order by p.id; insert ignore into post_responses select null, m.user_id, p.id post_id,1,0,0,0,now(),0,now() from posts p join members m on p.team_id=m.team_id where p.team_id=36 and m.team_id = 36 and m.user_id is not null order by p.id; insert ignore into post_responses select null, m.user_id, p.id post_id,1,0,0,0,now(),0,now() from posts p join members m on p.team_id=m.team_id where p.team_id=37 and m.team_id = 37 and m.user_id is not null order by p.id; insert ignore into post_responses select null, m.user_id, p.id post_id,1,0,0,0,now(),0,now() from posts p join members m on p.team_id=m.team_id where p.team_id=38 and m.team_id = 38 and m.user_id is not null order by p.id; insert ignore into post_responses select null, m.user_id, p.id post_id,1,0,0,0,now(),0,now() from posts p join members m on p.team_id=m.team_id where p.team_id=39 and m.team_id = 39 and m.user_id is not null order by p.id; -- 管理者フラグ カラム追加後 39th update members set admin_flg=0; update members set admin_flg=1 where name in ('片岡 瑛太' -- 36th ,'河島 礼央(父)' ,'小林 悠吏(父)' -- 37th ,'塩山 創祐(母)' ,'塩山 創祐(父)' -- 38th ,'有村 風音 (母)' ,'有村 風音(父)' -- 39th,40th ,'横溝 斗将・永斗(母)' ,'佐々木 太陽・大地(母)' ,'佐々木 太陽・大地(父)' ,'横溝 斗将,永斗(父)' ,'中村陽翔 (父)' ,'中村 陽翔(母)' ,'近藤 櫂(母)' ,'近藤 櫂(父)' ,'齊藤 誠晃母' ,'齊藤 誠晃・父' ,'池田 きり') -- アイコン更新 update members set prof_img_filename='woman.png' where name in ( '阿部 時宗' ,'田井 柾翔' ,'小笠原 隼' ,'長坂 夏樹' ,'田村 悠翔' ,'川島 修' ,'吉田 隼斗' ,'平田 大輔' ) −− schedulesの00:00:00をnullに更新 update schedules set time_from=null where time_from='00:00:00'; update schedules set time_to=null where time_to='00:00:00'; -- 一旦投稿コメントと投稿を削除(データ移行時用) delete from post_responses where post_id in (select id from posts where team_id=39) delete from post_comments where post_id in (select id from posts where team_id=39) delete from posts where team_id=39 -- 色々truncate truncate table posts; truncate table post_attachments; truncate table post_comments; truncate table post_comment_attachments; truncate table post_responses; truncate table questionnaires; truncate table questionnaire_answers; truncate table schedules; truncate table schedule_comments;
-- phpMyAdmin SQL Dump -- version 4.4.15.7 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jul 01, 2018 at 08:26 AM -- Server version: 5.6.37 -- PHP Version: 7.1.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `18php02_shop` -- -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE IF NOT EXISTS `categories` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -- -- Dumping data for table `categories` -- INSERT INTO `categories` (`id`, `name`) VALUES (1, 'Apple'), (2, 'Assus'), (3, 'Dell'), (4, 'Samsung'), (5, 'Others'); -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE IF NOT EXISTS `products` ( `id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `price` double NOT NULL, `image` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- -- Dumping data for table `products` -- INSERT INTO `products` (`id`, `category_id`, `name`, `price`, `image`) VALUES (1, 1, 'Apple 8 Red', 30000000, '8-red-300x300.jpg'), (2, 1, 'Balo laptop', 78000, 'balo.jpg'), (3, 5, 'Clock gold', 15000000, 'clock-gold-300x300.png'), (4, 5, 'Clock gold', 15000000, 'clock-gold-300x300.png'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL, `role` int(11) NOT NULL DEFAULT '0', `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `role`, `username`, `password`) VALUES (1, 1, 'tuantai568@gmail.com', 'e10adc3949ba59abbe56e057f20f883e'); -- -- Indexes for dumped tables -- -- -- Indexes for table `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`id`); -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `categories` -- ALTER TABLE `categories` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; /*!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 */;
CREATE SYNONYM [satelite].[geo_departamentos] FOR [INGLATERRA].[Satelite].[geo].[departamentos];
-- Lisää DROP TABLE lauseet tähän tiedostoon DROP TABLE IF EXISTS Trainer CASCADE; DROP TABLE IF EXISTS Typing CASCADE; DROP TABLE IF EXISTS Nature CASCADE; DROP TABLE IF EXISTS Ability CASCADE; DROP TABLE IF EXISTS Species CASCADE; DROP TABLE IF EXISTS Pokemon CASCADE; DROP TABLE IF EXISTS species_ability CASCADE;
DROP TABLE IF EXISTS `normative`; create table normative( normative_id bigint(20) NOT NULL AUTO_INCREMENT, staff_id bigint(20) not null, year date not null, normative_total int not null COMMENT 'tổng số tiết định mức theo năm', normative_teaching int not null COMMENT 'số tiết định mức giảng dạy theo năm', normative_other int not null comment 'số tiết cho hoạt động khác', description varchar(500) comment 'nội dung ghi chú', status int default 1, create_date timestamp default CURRENT_TIMESTAMP, PRIMARY KEY (`normative_id`) ); create table time_table( time_id bigint(20) not null AUTO_INCREMENT, special varchar(2000) comment 'ten chuyen de', num_season int not null default 0 comment 'so tiet hoc', conversion_season double default 0 comment 'so tiet quy doi', from_date varchar(50) comment 'thoi gian bat dau mon', to_date varchar(50) comment 'thoi gian ket thuc mon', staff_id bigint(20) not null comment 'ma nhan vien', status int default 1 comment 'trang thai', create_date date comment 'ngay tao', PRIMARY KEY (`time_id`) ); create table class( class_id bigint(20) not null auto_increment, class_name varchar(200) comment 'ten lop', staff_id bigint(100) comment 'giao vien chu nhiem', status int comment 'trang thai', create_date date comment 'ngay tao' );
create PROC [ERP].[Usp_Upd_AnticipoVenta_Desactivar] @ID INT, @UsuarioElimino VARCHAR(250) AS BEGIN UPDATE ERP.AnticipoVenta SET Flag = 0,UsuarioElimino =@UsuarioElimino , FechaActivacion = DATEADD(HOUR, 3, GETDATE()) WHERE ID = @ID UPDATE ERP.CuentaCobrar SET Flag = 0 WHERE ID = (SELECT IdCuentaCobrar FROM ERP.AnticipoVentaCuentaCobrar WHERE IdAnticipo = @ID) END
-- DML/DDL/DCL Part 4 -- -- Does the following statement use the DDL or DML component of SQL? ALTER TABLE things DROP CONSTRAINT things_item_key; Answer: Both `ALTER` and `DROP` deal with changing the structure of the data in a table/database. Although they might change/remove actual data in the process as side effects, they belong to Data Definitino Language component of SQL.
insert into Setting(id,graph,frequency) values(1,'{}',200)
create database if not exists test character set utf8 collate utf8_unicode_ci; use microcms; grant all privileges on test.* to 'test_user'@'localhost' identified by 'secret';
/** * Insert FR_CUSTOMER_FAVORITE_SHISETSU. * * @author LipNVP1 * $Id: AddFavoriteService_insertFavoriteShisetsu_Ins_01.sql 15039 2014-07-17 10:43:03Z p_guen_rippu $ */ INSERT INTO FR_CUSTOMER_FAVORITE_SHISETSU( CUSTOMER_IDENTIFY_ID ,SHISETSU_CD ,ADD_TIM_SHISETSU_NAME ,ADD_TIM_SHISETSU_TYPE ,ADD_TIM_SHISETSU_ADDRESS ,ADD_DATE ,CREATE_DATE ,CREATE_MODULE_ID ,UPDATE_DATE ,UPDATE_MODULE_ID ) VALUES ( /*customerIdentifyId*/'12345' ,/*shisetsuCd*/'1' ,/*addTimShisetsuName*/'a' ,/*addTimShisetsuType*/'a' ,/*addTimShisetsuAddress*/'2' ,/*addDate*/SYSDATE ,/*createDate*/SYSDATE ,/*createModuleId*/'common' ,/*updateDate*/SYSDATE ,/*updateModuleId*/'common' )
CREATE TABLE `nx_sns` ( `uid` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '角色uid', `create_time` datetime default NULL COMMENT '创建时间', `deleted` int(11) default NULL COMMENT '是否已删除标志', `save_time` datetime default NULL COMMENT '保存时间', `active_count` int(11) default NULL COMMENT '活跃值', `save_data` longblob COMMENT '保存的sns数据' ) CHARACTER SET utf8 ENGINE = MyISAM COMMENT='sns数据表-保存角色sns数据-DESIGNER:tangyz'; ALTER TABLE `nx_sns` ADD CONSTRAINT PK_nx_sns PRIMARY KEY CLUSTERED (uid); ALTER TABLE `nx_sns` ADD CONSTRAINT IX_nx_sns UNIQUE (uid); CREATE TABLE `nx_snslog` ( `serial_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , `log_time` datetime NULL DEFAULT NULL , `log_uid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL , `log_source` int(11) NULL DEFAULT NULL , `log_type` int(11) NULL DEFAULT NULL , `log_content` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL , `log_comment` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL , PRIMARY KEY (`serial_no`) ) ENGINE=MyISAM DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci;
DROP TABLE IF EXISTS moderation.distributed_moderator_actions; CREATE TABLE IF NOT EXISTS moderation.distributed_moderator_actions ( moderator_id UInt64, user_id UInt64, campaign_id Array(UInt64), advert_group_id UInt64 DEFAULT 0, advert_id UInt64 DEFAULT 0, object_id UInt64, kind_of_object String, object_type String, action String, rejected_reason Array(UInt64), industry_id Array(UInt64), category_id Array(UInt64), action_time DateTime, action_date Date DEFAULT toDate(action_time) ) ENGINE = MergeTree() PARTITION BY toYYYYMM(action_date) ORDER BY ( action_date, kind_of_object, action, moderator_id, user_id, advert_group_id, advert_id, object_id, object_type, action_time ) SETTINGS index_granularity = 8192;
CREATE SCHEMA IF NOT EXISTS `db_hanghoa` DEFAULT CHARACTER SET utf8 ; USE `db_hanghoa` ; CREATE TABLE IF NOT EXISTS `db_hanghoa`.`MATHANG` ( `MH` INT NOT NULL AUTO_INCREMENT, `TENHANG` VARCHAR(45) NULL, `DVT` VARCHAR(45) NULL, `SLHC` VARCHAR(45) NULL, `GBHT` VARCHAR(45) NULL, PRIMARY KEY (`MH`)); CREATE TABLE IF NOT EXISTS `db_hanghoa`.`PHIEUNHAP` ( `SP` INT NOT NULL, `NGAYNHAP` VARCHAR(45) NULL, `TNCC` VARCHAR(45) NULL, `MATHANG_MH` INT NOT NULL, PRIMARY KEY (`SP`), INDEX `fk_PHIEUNHAP_MATHANG_idx` (`MATHANG_MH` ASC) VISIBLE, CONSTRAINT `fk_PHIEUNHAP_MATHANG` FOREIGN KEY (`MATHANG_MH`) REFERENCES `db_hanghoa`.`MATHANG` (`MH`) ); CREATE TABLE IF NOT EXISTS `db_hanghoa`.`HOADONXUAT` ( `SOHD` INT NOT NULL, `NGAYBAN` VARCHAR(45) NULL, `TENNGMH` VARCHAR(45) NULL, `MATHANG_MH` INT NOT NULL, PRIMARY KEY (`SOHD`), INDEX `fk_HOADONXUAT_MATHANG1_idx` (`MATHANG_MH` ASC) VISIBLE, CONSTRAINT `fk_HOADONXUAT_MATHANG1` FOREIGN KEY (`MATHANG_MH`) REFERENCES `db_hanghoa`.`MATHANG` (`MH`) );
-----------------Data for table lunch_admin----------------- insert into lunch_admin(ID, PASS,NAME) values('admin','1234','김정윤'); insert into lunch_admin(ID,PASS,NAME) values('lunch','1234','류이호'); insert into lunch_admin(ID,PASS,NAME) values('root','1234','루랑이'); commit; -----------------Data for table lunch----------------- insert into lunch(LUNCH_CODE,LUNCH_NAME,IMG,PRICE,SPEC,ID) values(lunch_code,'포크칠리','m1_l1.gif',4500,'돈까스와 떡갈비에 탕수육까지 환상의 조합으로 다양한 맛을 느끼실 수 있는 부분 인지용.','admin'); insert into lunch(LUNCH_CODE,LUNCH_NAME,IMG,PRICE,SPEC,ID) values(lunch_code,'돈까스','m1_l2.gif',3800,'바삭튀겨낸 튀김옷안에 숨겨진 고기를 한입 베어물면 오지마을 이장님도 울고갈 감동실화인 부분 인지용. 소스맛도 끝내줍니다','admin'); commit; select * from lunch; -----------------Data for table ordering----------------- insert into ordering (ORDER_NUM, QUAN, ORDER_NAME, PHONE, IP_ADDRESS, LUNCH_CODE) values(order_code,1,'김정윤','010-3456-4567','211.63.89.132','L_000001'); insert into ordering (ORDER_NUM, QUAN, ORDER_NAME, PHONE, IP_ADDRESS, LUNCH_CODE) values(order_code,3,'공선의','010-5436-2455','211.63.89.157','L_000001'); insert into ordering (ORDER_NUM, QUAN, ORDER_NAME, PHONE, IP_ADDRESS, LUNCH_CODE) values(order_code,1,'이재현','010-5646-8786','211.63.89.135','L_000002'); commit;
-- Realizar una consulta SQL que retorne, para cada producto con más de 2 artículos -- distintos en su composición la siguiente información. -- -- 1) Detalle del producto -- -- 2) Rubro del producto -- -- 3) Cantidad de veces que fue vendido -- -- El resultado deberá mostrar ordenado por la cantidad de los productos que lo componen. -- -- NOTA: No se permite el uso de sub-selects en el FROM ni funciones definidas por el usuario -- para este punto. SELECT prod_detalle, prod_rubro, COUNT(item_numero) AS cant_vendida FROM Producto --HAY UN PRODUCTO QUE NO TIENE VENTAS ENTONCES EL LEFT JOIN PERMITE QUE APAREZCA CON CANTIDAD = 0 LEFT JOIN Item_Factura ON item_producto = prod_codigo --ACLARABA QUE TENIAN QUE SER DISTINTOS, POR ESO PUSE EL DISTINCT, PERO CON UN * FUNCIONABA WHERE (SELECT COUNT(DISTINCT comp_componente) FROM Composicion WHERE comp_producto = prod_codigo) >= 2 GROUP BY prod_codigo, prod_detalle, prod_rubro ORDER BY (SELECT COUNT(DISTINCT comp_componente) FROM Composicion WHERE comp_producto = prod_codigo) DESC /* VERSION CON JOIN COMPOSICION SELECT prod_detalle, prod_rubro, COUNT(DISTINCT item_numero) as cantidad_veces_vendido FROM Producto JOIN Composicion on comp_producto = prod_codigo LEFT JOIN Item_Factura on item_producto = prod_codigo --ACLARABA QUE TENIAN QUE SER DISTINTOS, POR ESO PUSE EL DISTINCT, PERO CON UN * FUNCIONABA GROUP BY prod_codigo, prod_detalle, prod_rubro HAVING COUNT(DISTINCT comp_componente) >= 2 ORDER BY COUNT(DISTINCT comp_componente) desc */
CREATE TABLE statistic_archive ( player_id UUID NOT NULL, statistic VARCHAR(32) NOT NULL, value INTEGER NOT NULL, date DATE NOT NULL, PRIMARY KEY (player_id, statistic, date) );
CREATE DEFINER=`root`@`localhost` FUNCTION `getSum`( p_wish_id int ) RETURNS int(11) DETERMINISTIC BEGIN select sum(wish_like) into @sm from tbl_likes where wish_id = p_wish_id; RETURN @sm; END
-- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Client : localhost:3306 -- Généré le : Ven 10 Juin 2016 à 08:49 -- Version du serveur : 5.5.42 -- Version de PHP : 7.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données : `todolist` -- -- -- Structure de la table `users` -- CREATE TABLE `users` ( `id` int(11) unsigned NOT NULL, `name` varchar(255) NOT NULL DEFAULT '', `first_name` varchar(255) NOT NULL DEFAULT '', `email` varchar(255) NOT NULL DEFAULT '', `password` varchar(50) NOT NULL DEFAULT '' ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -- -- Contenu de la table `users` -- INSERT INTO `users` (`id`, `name`, `first_name`, `email`, `password`) VALUES (1, 'Vilain', 'Dominique', 'dominique.vilain@hepl.be', 'f313791ae069ed592c35c483b3d4f8d2a74a74b2'), (2, 'Dupont', 'Myriam', 'myriam.dupont@hepl.be', '2ef4f19de87532afb29e571e9b5fc8fc96a189c3'), (3, 'Stark', 'Eddard', 'eddard.stark@hepl.be', '68f65a77c959bc29c8eee0fe1f77de3011b79fd7'); -- -------------------------------------------------------- -- -- Structure de la table `tasks` -- CREATE TABLE `tasks` ( `id` int(10) unsigned NOT NULL, `description` text NOT NULL, `is_done` tinyint(3) unsigned NOT NULL DEFAULT '0' ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; -- -- Contenu de la table `tasks` -- INSERT INTO `tasks` (`id`, `description`, `is_done`) VALUES (28, 'Dominique doit regarder l’examen', 1); -- -------------------------------------------------------- -- -- Structure de la table `task_user` -- CREATE TABLE `task_user` ( `id` int(11) unsigned NOT NULL, `task_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; -- -- Contenu de la table `task_user` -- INSERT INTO `task_user` (`id`, `task_id`, `user_id`) VALUES (31, 28, 2); -- -------------------------------------------------------- -- -- Index pour les tables exportées -- -- -- Index pour la table `tasks` -- ALTER TABLE `tasks` ADD PRIMARY KEY (`id`); -- -- Index pour la table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- Index pour la table `task_user` -- ALTER TABLE `task_user` ADD PRIMARY KEY (`id`), ADD KEY `task_id` (`task_id`), ADD KEY `user_id` (`user_id`); -- -- AUTO_INCREMENT pour les tables exportées -- -- -- AUTO_INCREMENT pour la table `tasks` -- ALTER TABLE `tasks` MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=29; -- -- AUTO_INCREMENT pour la table `users` -- ALTER TABLE `users` MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4; -- -- AUTO_INCREMENT pour la table `task_user` -- ALTER TABLE `task_user` MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=32; -- -- Contraintes pour les tables exportées -- -- -- Contraintes pour la table `task_user` -- ALTER TABLE `task_user` ADD CONSTRAINT `fk_task_id` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
SELECT ProductID , ListPrice , (SELECT AVG(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS AvgListPrice , (SELECT STDEV(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS StDevListPrice FROM Production.Product WHERE ListPrice != 0
/* Formatted on 17/06/2014 18:07:26 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCREI_APP_COINTESTATARI ( COD_SNDG, COD_SNDG_COINT, COD_ABI_COINT, COD_NDG_COINT, DESC_NOME_CONTROPARTE, COD_TIPO_LEGAME ) AS SELECT leg.cod_sndg, leg.cod_sndg_legame AS cod_sndg_coint, f.cod_abi_cartolarizzato AS cod_abi_coint, f.cod_ndg AS cod_ndg_coint, a.desc_nome_controparte, leg.cod_legame AS cod_tipo_legame FROM ( (SELECT a.cod_sndg, a.cod_sndg_legame, a.cod_legame FROM t_mcrei_app_legame_cointest a) UNION ALL (SELECT c.cod_sndg_legame, c.cod_sndg, c.cod_legame FROM t_mcrei_app_legame_cointest c)) leg, t_mcrei_app_file_guida_coint f, t_mcrei_app_anagr_gruppo_coint a WHERE leg.cod_sndg_legame = f.cod_sndg AND leg.cod_sndg_legame = a.cod_sndg; GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE, ON COMMIT REFRESH, QUERY REWRITE, DEBUG, FLASHBACK, MERGE VIEW ON MCRE_OWN.V_MCREI_APP_COINTESTATARI TO MCRE_USR;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 09, 2021 at 02:10 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `bizzmirth` -- -- -------------------------------------------------------- -- -- Table structure for table `branch_manager` -- CREATE TABLE `branch_manager` ( `id` int(11) NOT NULL, `branch_manager_id` varchar(255) NOT NULL, `firstname` varchar(255) NOT NULL, `lastname` varchar(255) NOT NULL, `email` varchar(100) NOT NULL, `country_code` varchar(3) NOT NULL, `contact_no` varchar(15) NOT NULL, `head_office` varchar(99) NOT NULL, `zone` varchar(99) NOT NULL, `region` varchar(99) NOT NULL, `date_of_birth` date NOT NULL, `age` varchar(5) NOT NULL, `gender` varchar(10) NOT NULL, `country` varchar(255) NOT NULL, `state` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `pincode` varchar(8) NOT NULL, `address` text NOT NULL, `profile_pic` varchar(255) NOT NULL, `kyc` varchar(255) NOT NULL, `pan_card` varchar(255) NOT NULL, `aadhar_card` varchar(255) NOT NULL, `voting_card` varchar(255) NOT NULL, `bank_passbook` varchar(255) NOT NULL, `registrant` varchar(100) NOT NULL, `reference_no` varchar(255) NOT NULL, `register_by` varchar(100) NOT NULL, `user_type` int(11) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT '0-deleted 1-registered 2-pending 3-removed' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `branch_manager` -- INSERT INTO `branch_manager` (`id`, `branch_manager_id`, `firstname`, `lastname`, `email`, `country_code`, `contact_no`, `head_office`, `zone`, `region`, `date_of_birth`, `age`, `gender`, `country`, `state`, `city`, `pincode`, `address`, `profile_pic`, `kyc`, `pan_card`, `aadhar_card`, `voting_card`, `bank_passbook`, `registrant`, `reference_no`, `register_by`, `user_type`, `register_date`, `deleted_date`, `status`) VALUES (1, 'BMGA096', 'sdfdsfdsf ok', 'dsfdsfsdf', 'dsfsd@gmail.com', '91', '0820828644', 'gfhfgh', 'gfhgfh', 'gfhgfh', '1999-07-08', '22', 'male', '1', '6', '13', '403 202', 'gfhgfhgfh', 'profile_pic/2207202109161330100.jpg', '', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-08-05 10:12:10', '2021-08-05 15:42:10', 3), (2, 'BMKL259', 'ghfhgf', 'gfhgfhgf', 'hgfhgfh@gmail.com', '91', '0808286425', 'dfsdf', 'dsff', 'dfsdfsd', '1996-07-13', '25', 'male', '1', '12', 'dfgfdgdf', '675645', 'dsfdfsdgdfgf', 'profile_pic/220720210917555c1lDgi.jpg', '', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-07-29 11:29:46', '2021-07-29 16:59:46', 3), (3, 'BMAS814', 'dfgfg', 'fdgdfg', 'dfgdfgdf@ggg.com', '91', '3464563456', 'gdfgdfg', 'fdgdfgdf', 'fdgdfg', '2000-07-14', '21', 'female', '1', '3', 'dgfdgf', '676754', 'fdgdfgdfgdfgdfgd', 'profile_pic/220720210920095c1lDgi.jpg', '', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-07-26 11:06:30', '', 0), (4, 'BMGA814', 'savio', 'Miranda', 'saviomanblue@gmail.com', '91', '0298286425', 'dsfsdf', 'sdfsfds', 'sdfsdf', '2001-07-09', '20', 'male', '1', '6', '13', '403 202', 'fdgsdfsdfsdfsdfsf', 'profile_pic/2207202109324320525386_1964954860185193_3693311684249777947_n.jpg', '', '', '', '', '', 'hghg gkgk', 'RMGA003', '7', 6, '2021-07-23 12:11:04', '', 1), (5, 'BMGA593', 'savio ok', 'miranda ok', 'dfdsfdf@gmail.com', '91', '6754653456', 'gdfgdfg', 'dfgdfgdf', 'dfgdfgdfg', '2000-07-13', '21', 'male', '1', '6', '13', '403 202', 'fdgdfgfdgfdgfdgfdgdf ok', 'profile_pic/26072021141945at2.jpg', '', '', '', '', '', 'tony miranda', 'RMGA352', '7', 6, '2021-07-26 12:27:55', '2021-07-26 17:57:55', 3), (6, 'BMGA610', 'dfsfsd', 'sdfdsfsdf', 'sdfsdfsd@gmail.com', '91', '5678237654', 'panjim ok', 'dsff', 'dsfdfds', '2000-07-21', '21', 'male', '1', '6', '13', '403 202', 'sdfdsfsdfsdfsdfsdfdsf', 'profile_pic/26072021143847at3.jpg', '', '', '', '', '', 'tony miranda', 'RMGA352', '7', 6, '2021-07-26 12:39:46', '', 1), (7, 'BMGA713', 'hgfhgfh', 'fhgfhfg', 'fghgfhghf@gmail.com', '91', '7654565434', 'dfgdfgdfgdf', 'gdfgdfgdf', 'dfgdfgdf', '2000-07-21', '21', 'male', '1', '6', '2', '403 508', 'gdfgdfgdfg', 'profile_pic/27072021133535at3.jpg', '', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-07-28 06:01:11', '2021-07-28 11:31:11', 3), (8, 'BMGA837', 'fgddfgdf', 'gdfgdfg', 'dgdfgdfg@gmail.com', '91', '7676545654', 'fdsfsdfd', 'sfsdfsdf', 'sdfsdfsd', '1993-07-06', '28', 'male', '1', '6', '6', '403 601', 'dsfdsfsdfsd', 'profile_pic/27072021143337at3.jpg', '', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-07-28 05:57:18', '2021-07-28 11:27:18', 3), (9, 'BMGA612', 'fdgdfgdf ok', 'gdfgdfgd', 'dfgfgdfgdfg@gmail.com', '91', '9878675645', 'gdfgdfg', 'dfgfgfdg', 'hghgfhfgh', '2000-07-07', '21', 'male', '1', '6', '12', '403 201', 'dfgdfgdfgdf', 'profile_pic/27072021143751at2.jpg', '', '', '', '', '', 'tony miranda', 'RMGA352', '7', 6, '2021-07-28 07:00:26', '', 1), (10, '', 'gfhgfhfg', 'gfhgfh', 'fghgfhgf@gmail.com', '91', '6756987678', 'gfhgfhgh', 'gfhgfhgfhg', 'gfhgfhgfh', '2000-07-15', '21', 'male', '1', '6', '13', '403 202', 'ghgfhgfhgfhgfh', 'profile_pic/28072021080212at3.jpg', '', '', '', '', '', 'hghg gkgk', 'RMGA003', '7', 6, '2021-07-28 06:02:34', '2021-07-28 11:32:34', 0), (11, '', 'savio ok', 'MIRANDA', 'saviogmanblue@gmail.com', '91', '0820826425', 'hgmhm', 'ghmhmh', 'ghmghmgh', '1999-07-15', '22', 'male', '1', '6', '11', '403 808', 'hgmhmhgm', 'profile_pic/28072021090841at3.jpg', '', '', '', '', '', 'hghg gkgk', 'RMGA003', '7', 6, '2021-07-28 07:12:18', '2021-07-28 12:42:18', 0), (12, '', 'dfsfdsf', 'sdfsdfsdf', 'sadsads@gmail.com', '91', '4567234590', 'dfgdfgd', 'fdgfdgdfgdfg', 'fdgdfgdf', '2000-07-14', '21', 'male', '1', '6', '14', '403 401', 'gfdfgfggdgdfgdfgfdgdf', 'profile_pic/29072021131508at2.jpg', 'kyc/29072021131503at3.jpg', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-07-29 11:15:11', '', 2), (13, 'BMGA095', 'dfsfdsf', 'sdfsdfsdf', 'sadsads@gmail.com', '91', '4567234590', 'dfgdfgd', 'fdgfdgdfgdfg', 'fdgdfgdf', '2000-07-14', '21', 'male', '1', '6', '14', '403 401', 'gfdfgfggdgdfgdfgfdgdf', 'profile_pic/29072021131508at2.jpg', 'kyc/29072021131503at3.jpg', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-08-05 09:54:46', '', 1), (14, 'BMGA653', 'dfsfdsf', 'sdfsdfsdf', 'sadsads@gmail.com', '91', '4567234590', 'dfgdfgd', 'fdgfdgdfgdfg', 'fdgdfgdf', '2000-07-14', '21', 'male', '1', '6', '14', '403 401', 'gfdfgfggdgdfgdfgfdgdf', 'profile_pic/29072021131508at2.jpg', 'kyc/29072021131503at3.jpg', '', '', '', '', 'savio MIRANDA', 'RMGA001', '7', 6, '2021-07-29 11:30:30', '2021-07-29 17:00:30', 3); -- -------------------------------------------------------- -- -- Table structure for table `category` -- CREATE TABLE `category` ( `id` int(11) NOT NULL, `category_name` varchar(255) NOT NULL, `description` text NOT NULL, `picture` varchar(299) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 1 COMMENT '1-present 2-deleted' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `category` -- INSERT INTO `category` (`id`, `category_name`, `description`, `picture`, `register_date`, `deleted_date`, `status`) VALUES (1, 'ghgfhgf', 'ghfghgfh', 'category/09082021121353animalscat1.jpg', '2021-08-09 10:14:34', '', 1), (2, 'fgdgfdg', 'gfdgfdgfdg', 'category/090820211216375c1lDgi.jpg', '2021-08-09 10:26:57', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `cities` -- CREATE TABLE `cities` ( `id` int(11) NOT NULL, `city_name` varchar(255) NOT NULL, `district` varchar(99) NOT NULL, `pincode` varchar(7) NOT NULL, `state_id` int(11) NOT NULL, `status` int(11) NOT NULL DEFAULT 1 COMMENT '0-deleted 1-allow 2-not allow' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `cities` -- INSERT INTO `cities` (`id`, `city_name`, `district`, `pincode`, `state_id`, `status`) VALUES (1, 'Airport, Dabolim', 'South Goa', '403 801', 6, 1), (2, 'Aldona', 'North Goa', '403 508', 6, 1), (3, 'Altinho', 'North Goa', '403 001', 6, 1), (4, 'Alto Porvorim', 'North Goa', '403 521', 6, 1), (5, 'Anjuna', 'North Goa', '403 509', 6, 1), (6, 'Aquem', 'South Goa', '403 601', 6, 1), (7, 'Arambol', 'North Goa', '403 524', 6, 1), (8, 'Arpora', 'North Goa', '403 518', 6, 1), (9, 'Assonora', 'North Goa', '403 503', 6, 1), (10, 'Assolna', 'South Goa', '403 701', 6, 1), (11, 'Baina', 'South Goa', '403 808', 6, 1), (12, 'Bambolim Camp', 'North Goa', '403 201', 6, 1), (13, 'Bambolim Complex', 'North Goa', '403 202', 6, 1), (14, 'Bazar Ponda', 'North Goa', '403 401', 6, 1), (15, 'Benaulim', 'South Goa', '403 716', 6, 1), (16, 'Betim', 'North Goa', '403 101', 6, 1), (17, 'Betora Ind Estate', 'South Goa', '403 409', 6, 1), (18, 'Betul', 'South Goa', '403 603', 6, 1), (19, 'Bicholim', 'North Goa', '403 504', 6, 1), (20, 'Bogmalo', 'South Goa', '403 806', 6, 1), (21, 'Calangute', 'North Goa', '403 516', 6, 1), (22, 'Canacona', 'South Goa', '403 702', 6, 1), (23, 'Candolim', 'North Goa', '403 515', 6, 1), (24, 'Cansaulim', 'South Goa', '403 712', 6, 1), (25, 'Caranzalem', 'North Goa', '403 002', 6, 1), (26, 'Carmona', 'South Goa', '403 523', 6, 1), (27, 'Cavelossim', 'South Goa', '403 731', 6, 1), (28, 'Chandor', 'South Goa', '403 174', 6, 1), (29, 'Chicalim', 'South Goa', '403 711', 6, 1), (30, 'Chinchinim', 'South Goa', '403 715', 6, 1), (31, 'Chorao', 'North Goa', '404 102', 6, 1), (32, 'Collem', 'South Goa', '403 410', 6, 1), (33, 'Colva', 'South Goa', '403 708', 6, 1), (34, 'Colvale', 'North Goa', '403 513', 6, 1), (35, 'Complex Altinho', 'North Goa', '403 001', 6, 1), (36, 'Corlim Ind. Estate', 'North Goa', '403 110', 6, 1), (37, 'Carmona', 'South Goa', '403 717', 6, 1), (38, 'Cortalim', 'South Goa', '403 710', 6, 1), (39, 'Cuncolim', 'South Goa', '403 703', 6, 1), (40, 'Curchorem', 'South Goa', '403 706', 6, 1), (41, 'Dona Paula', 'North Goa', '403 004', 6, 1), (42, 'Dramapur', 'South Goa', '403 725', 6, 1), (43, 'Duler', 'North Goa', '403 527', 6, 1), (44, 'Farmagudi', 'South Goa', '403 405', 6, 1), (45, 'Fatorda', 'South Goa', '403 602', 6, 1), (46, 'Fontainhas', 'North Goa', '403 001', 6, 1), (47, 'Goa University', 'North Goa', '403 206', 6, 1), (48, 'Goa Velha', 'North Goa', '403 108', 6, 1), (49, 'Honda Ind Estate', 'North Goa', '403 530', 6, 1), (50, 'Kundaim Ind Estate', 'South Goa', '403 110', 6, 1), (51, 'Loliem', 'South Goa', '403 728', 6, 1), (52, 'Loutulim', 'South Goa', '403 718', 6, 1), (53, 'Majorda', 'South Goa', '403 713', 6, 1), (54, 'Mandrem', 'North Goa', '403 527', 6, 1), (55, 'Mapuca', 'North Goa', '403 507', 6, 1), (56, 'Marcel', 'North Goa', '403 107', 6, 1), (57, 'Mardol', 'North Goa', '403 404', 6, 1), (58, 'Margao', 'South Goa', '403 601', 6, 1), (59, 'Moira', 'North Goa', '403 514', 6, 1), (60, 'Mormugao', 'South Goa', '403 803', 6, 1), (61, 'Naval Base Verem', 'North Goa', '403 109', 6, 1), (62, 'Navelim', 'South Goa', '403 707', 6, 1), (63, 'Navelim Camp', 'South Goa', '403 707', 6, 1), (64, 'Neura', 'North Goa', '403 104', 6, 1), (65, 'Nuvem', 'South Goa', '403 604', 6, 1), (66, 'Orlim', 'South Goa', '403 724', 6, 1), (67, 'Panaji', 'North Goa', '403 001', 6, 1), (68, 'Pernem', 'North Goa', '403 512', 6, 1), (69, 'Ponda', 'North Goa', '403 401', 6, 1), (70, 'Quepem', 'South Goa', '403 405', 6, 1), (71, 'Reis Magos', 'North Goa', '403 114', 6, 1), (72, 'Ribandar', 'North Goa', '403 006', 6, 1), (73, 'Saligao', 'North Goa', '403 531', 6, 1), (74, 'Sanguem', 'South Goa', '403 704', 6, 1), (75, 'Santa Cruz', 'North Goa', '403 005', 6, 1), (76, 'Sinquerim', 'North Goa', '403 519', 6, 1), (77, 'Siolim', 'North Goa', '403 517', 6, 1), (78, 'Taleigao', 'North Goa', '403 003', 6, 1), (79, 'Tisca (Ponda)', 'South Goa', '403 406', 6, 1), (80, 'Tivim', 'North Goa', '403 502', 6, 1), (81, 'Usgao', 'North Goa', '403 407', 6, 1), (82, 'Vaddem', 'South Goa', '403 802', 6, 1), (83, 'Valpoi', 'North Goa', '403 506', 6, 1), (84, 'Varca', 'South Goa', '403 721', 6, 1), (85, 'Vasco da Gama', 'South Goa', '403 802', 6, 1), (86, 'Velim', 'South Goa', '403 722', 6, 1), (87, 'Verna', 'South Goa', '403 722', 6, 1), (88, 'Zuarinagar', 'South Goa', '403 726', 6, 1), (89, 'Sanquelim', 'North Goa', '403505', 6, 1); -- -------------------------------------------------------- -- -- Table structure for table `countries` -- CREATE TABLE `countries` ( `id` int(11) NOT NULL, `sortname` varchar(3) NOT NULL, `country_name` varchar(255) NOT NULL, `country_code` varchar(5) NOT NULL, `status` int(11) NOT NULL DEFAULT 1 COMMENT '0-deleted 1-allow 2-not allow' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `countries` -- INSERT INTO `countries` (`id`, `sortname`, `country_name`, `country_code`, `status`) VALUES (1, 'IN', 'India', '91', 1); -- -------------------------------------------------------- -- -- Table structure for table `customer` -- CREATE TABLE `customer` ( `id` int(11) NOT NULL, `cust_id` varchar(255) NOT NULL, `firstname` varchar(99) NOT NULL, `lastname` varchar(99) NOT NULL, `email` varchar(100) NOT NULL, `country_code` varchar(3) NOT NULL, `contact_no` varchar(15) NOT NULL, `date_of_birth` date NOT NULL, `age` varchar(5) NOT NULL, `gender` varchar(10) NOT NULL, `country` varchar(255) NOT NULL, `state` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `pincode` varchar(8) NOT NULL, `address` text NOT NULL, `profile_pic` varchar(255) NOT NULL, `kyc` varchar(255) NOT NULL, `pan_card` varchar(255) NOT NULL, `aadhar_card` varchar(255) NOT NULL, `voting_card` varchar(255) NOT NULL, `bank_passbook` varchar(255) NOT NULL, `level` varchar(70) NOT NULL, `user_type` int(11) NOT NULL, `registrant` varchar(100) NOT NULL, `reference_no` varchar(255) NOT NULL, `customer_reference_no` varchar(255) NOT NULL, `register_by` varchar(99) NOT NULL COMMENT '1. admin 3.Travel Agent', `register_date` timestamp NOT NULL DEFAULT current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT '0-deleted 1-registered 2-pending' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `customer` -- INSERT INTO `customer` (`id`, `cust_id`, `firstname`, `lastname`, `email`, `country_code`, `contact_no`, `date_of_birth`, `age`, `gender`, `country`, `state`, `city`, `pincode`, `address`, `profile_pic`, `kyc`, `pan_card`, `aadhar_card`, `voting_card`, `bank_passbook`, `level`, `user_type`, `registrant`, `reference_no`, `customer_reference_no`, `register_by`, `register_date`, `deleted_date`, `status`) VALUES (1, 'CU2100001', 'savio', 'MIRANDA', 'saviomanblue@gmail.com', '91', '0208286425', '2001-07-13', '20', 'male', '1', '6', '15', '403 716', 'jfyhfjhfgfgjf', 'profile_pic/29072021074539at3.jpg', '', '', '', '', '', '', 2, '', '', '', '1', '2021-07-29 05:45:52', '2021-07-29 11:49:11', 0), (2, 'CU2100002', 'uhjkhjh', 'kklhjhk', 'ghgjgj@gmail.com', '91', '5645348765', '1999-07-21', '22', 'male', '1', '6', '9', '403 503', 'sdfsdfdsfsdf', 'profile_pic/29072021074702at3.jpg', '', '', '', '', '', '', 2, 'ghhgfh ok ghgfhgfh', 'TA21002', '', '3', '2021-07-29 05:47:03', '2021-07-29 11:49:55', 0), (3, 'CU2100004', 'dfgfg', 'dfgdfg', 'dfgfgfdg@gmail.com', '91', '8978675678', '2000-07-16', '21', 'male', '1', '6', '13', '403 202', 'dfgdfgdfgdfgdfg', 'profile_pic/29072021082042at3.jpg', '', '', '', '', '', '', 2, '', '', '', '1', '2021-07-29 06:20:51', '2021-07-29 11:52:13', 0), (4, 'CU2100003', 'dfgfdgfd', 'gdfgdfgdfg', 'dfgdfgdfg@gmail.com', '91', '3456783456', '1999-07-16', '22', 'female', '1', '6', '9', '403 503', 'dfgdfgdfgdfgdfgdf', 'profile_pic/29072021082139at2.jpg', '', '', '', '', '', '', 2, 'ghhgfh ok ghgfhgfh', 'TA21002', '', '3', '2021-07-29 06:21:47', '2021-07-29 11:52:24', 0), (5, 'CU2100005', 'gdfgdfdffg ok', 'dfgdfgfdg', 'dfgdfgd@gmail.com', '91', '4567345678', '1999-07-06', '22', 'male', '1', '6', '11', '403 808', 'hgfhgfhfghghfh', 'profile_pic/29072021114653at3.jpg', '', '', '', '', '', '', 2, '', '', '', '1', '2021-07-29 09:46:55', '', 1), (6, 'CU2100006', 'ghjghjgh', 'hjghjhj', 'ghjhgj@gmail.com', '91', '9087876565', '1997-07-12', '24', 'male', '1', '6', '15', '403 716', 'dgfgdfgdfgdfgfdgf', 'profile_pic/29072021114826at3.jpg', '', '', '', '', '', '1', 2, 'ghhgfh ok ghgfhgfh', 'TA21002', 'CU2100005', '3', '2021-07-29 09:48:27', '2021-07-30 11:53:37', 0), (7, 'CU2100007', 'ghhghgfh', 'gfhgfhgf', 'jfgfg@gmail.com', '91', '2345434565', '1997-07-07', '24', 'male', '1', '6', '13', '403 202', 'fdgfdgfdgdfgg', 'profile_pic/30072021082440at3.jpg', '', '', '', '', '', '', 2, 'ghhgfh ok ghgfhgfh', 'TA21002', '', '3', '2021-07-30 06:25:27', '', 1), (8, 'CU2100008', 'dgfgfdgfdg', 'dfgdfgdfg', 'dfgdfgdf@gmial.com', '91', '7678765456', '1997-07-13', '24', 'female', '1', '6', '14', '403 401', 'dfdsfdsfsf dsfsdfsdfsd', 'profile_pic/30072021093641at2.jpg', '', '', '', '', '', '1', 2, 'ghhgfh ghgfhgfh', 'TA21002', 'CU2100007', '3', '2021-07-30 07:36:43', '', 1), (9, '', 'gfhfghgfh', 'gfhgfhgfhfg', 'hfhfgh@gmail.com', '91', '0820828642', '1999-08-10', '22', 'male', '1', '6', '9', '403 503', 'jhhljljhjhkh', 'profile_pic/04082021115713at3.jpg', 'kyc/04082021115747at3.jpg', '', '', '', '', '', 2, '', '', '', '1', '2021-08-04 09:57:52', '', 2); -- -------------------------------------------------------- -- -- Table structure for table `franchisee` -- CREATE TABLE `franchisee` ( `id` int(11) NOT NULL, `franchisee_id` varchar(255) NOT NULL, `firstname` varchar(99) NOT NULL, `lastname` varchar(99) NOT NULL, `email` varchar(100) NOT NULL, `country_code` varchar(3) NOT NULL, `contact_no` varchar(15) NOT NULL, `date_of_birth` date NOT NULL, `age` varchar(5) NOT NULL, `gender` varchar(10) NOT NULL, `country` varchar(255) NOT NULL, `state` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `pincode` varchar(8) NOT NULL, `address` text NOT NULL, `profile_pic` varchar(255) NOT NULL, `kyc` varchar(255) NOT NULL, `pan_card` varchar(255) NOT NULL, `aadhar_card` varchar(255) NOT NULL, `voting_card` varchar(255) NOT NULL, `bank_passbook` varchar(255) NOT NULL, `registrant` varchar(100) NOT NULL, `reference_no` varchar(255) NOT NULL, `register_by` varchar(100) NOT NULL COMMENT '1. admin 5.Sales Manager', `user_type` int(11) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT '0-deleted 1-registered 2-pending' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `franchisee` -- INSERT INTO `franchisee` (`id`, `franchisee_id`, `firstname`, `lastname`, `email`, `country_code`, `contact_no`, `date_of_birth`, `age`, `gender`, `country`, `state`, `city`, `pincode`, `address`, `profile_pic`, `kyc`, `pan_card`, `aadhar_card`, `voting_card`, `bank_passbook`, `registrant`, `reference_no`, `register_by`, `user_type`, `register_date`, `deleted_date`, `status`) VALUES (1, 'F21001', 'hjsgdsg ok', 'fhfhh', 'hbhb@gmail.com', '91', '9876786546', '1997-07-21', '24', 'male', '1', '6', '9', '403 503', 'fdgsdfsdfsdfsdfsf', 'profile_pic/23072021122822at3.jpg', '', '', '', '', '', 'fdsffsdf sdfsdff', 'SMGA206', '5', 4, '2021-07-28 11:36:53', '2021-07-28 17:06:53', 0), (2, 'F21002', 'gdfdgfdg', 'dfgdfgd', 'dfgdfgdf@ggg.com', '91', '6545654543', '1998-07-13', '23', 'female', '1', '6', '6', '403 601', 'sdfsdfdsfsdf', 'profile_pic/28072021133746at3.jpg', '', '', '', '', '', 'fdsffsdf ok sdfsdff', 'SMGA206', '5', 4, '2021-07-30 05:02:03', '2021-07-30 10:32:03', 0), (3, '', 'gfhgfhgfh ok', 'gfhgfhgfh', 'gfhgfh@gmail.com', '91', '4537656789', '1998-07-13', '23', 'male', '1', '6', '11', '403 808', 'fdgfgdfgddfg', 'profile_pic/29072021072758at3.jpg', '', '', '', '', '', 'tony miranda', 'SMGA470', '5', 4, '2021-07-29 05:30:29', '', 2), (4, 'F21003', 'dsgfdsf ok', 'sdfsdfsd', 'fsdfsdfsd@gmail.com', '91', '8978675690', '1999-07-06', '22', 'male', '1', '6', '12', '403 201', 'dasdadasd dasdasdsd', 'profile_pic/30072021070259at3.jpg', '', '', '', '', '', 'tony sdfsdff', 'SMGA206', '5', 4, '2021-08-02 10:13:08', '', 1), (5, '', 'fgfdgfd', 'dfgfdg', 'fdgfdgdfg@gmail.com', '91', '0808286425', '2000-08-20', '20', 'male', '1', '6', '16', '403 101', 'fdsfdsfsdfsdfsdf', 'profile_pic/05082021111555at3.jpg', '', '', '', '', '', 'savio fgjfjgf', 'SMGA205', '5', 4, '2021-08-05 09:16:24', '', 2); -- -------------------------------------------------------- -- -- Table structure for table `login` -- CREATE TABLE `login` ( `id` int(11) NOT NULL, `username` varchar(100) NOT NULL, `password` varchar(50) NOT NULL, `user_id` varchar(255) NOT NULL, `user_type_id` varchar(30) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp(), `status` int(11) NOT NULL DEFAULT 1 COMMENT '3-removed 1-present 0-deleted' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `login` -- INSERT INTO `login` (`id`, `username`, `password`, `user_id`, `user_type_id`, `register_date`, `status`) VALUES (1, 'admin', 'admin@32', '1', '1', '2021-07-22 05:33:03', 1), (2, 'saviomanblue@gmail.com', 'EmNMwqag', 'RMGA001', '7', '2021-07-22 06:49:38', 1), (3, 'saviomaggugnblue@gmail.com', 'luA!Dgiw', 'RMKL002', '7', '2021-07-22 06:49:43', 1), (4, 'saviomanvhvblue@gmail.com', '@Ca4g*E3', 'RMGA003', '7', '2021-07-22 06:49:49', 3), (5, 'nbnb@gamil.com', 'c5ZmPoHE', 'RMAS003', '7', '2021-07-22 06:52:00', 1), (6, 'saviomanblue@gmail.com', 'J8#uRjT*', 'BM417', '6', '2021-07-22 07:10:51', 1), (7, 'dsfsd@gmail.com', 'Meo!k*Wc', 'BMGA096', '6', '2021-07-22 07:16:19', 3), (8, 'hgfhgfh@gmail.com', 'BqtNXJ6z', 'BMKL259', '6', '2021-07-22 07:18:43', 1), (9, 'dfgdfgdf@ggg.com', 'Cr9*f0nx', 'BMAS814', '6', '2021-07-22 07:20:21', 1), (10, 'saviomanblue@gmail.com', 'mM4Pfk*C', 'BMGA814', '6', '2021-07-22 07:32:48', 1), (11, 'fghf@gmail.com', 'Eau#wtyh', 'BMGA485', '7', '2021-07-22 11:30:01', 3), (12, 'saviomanblue@gmail.com', 'JLM(k5vG', 'SMGA205', '5', '2021-07-22 11:38:46', 3), (13, 'fghg@gmail.com', 'nm6BpRVH', 'SMGA910', '5', '2021-07-22 11:43:07', 3), (14, 'saviomanblue@gmail.com', 'pjhc^bW0', 'SMGA205', '5', '2021-07-22 12:05:11', 3), (15, 'sdfsdf@gmail.com', 'kS7WqmlR', 'SMGA206', '5', '2021-07-22 12:37:44', 1), (16, 'khjkhj@gmail.com', 'UAoi4f5*', 'SMGA246', '5', '2021-07-22 12:39:40', 3), (17, 'hbhb@gmail.com', 'IRAs5vTd', 'F21001', '4', '2021-07-23 10:29:32', 0), (18, 'fhfh@gmail.com', 'UL9pICX@', 'SMGA756', '5', '2021-07-23 11:16:10', 3), (19, 'tonye@gmail.com', 'yqju1QGS', 'SMGA470', '5', '2021-07-26 11:10:00', 3), (20, 'tony@gmail.com', 'KWcbCfro', 'RMGA352', '7', '2021-07-26 11:14:45', 3), (21, 'dfdsfdf@gmail.com', 'McpqXylL', 'BMGA593', '6', '2021-07-26 12:20:55', 3), (22, 'sdfsdfsd@gmail.com', 'E)rC2Sn@', 'BMGA610', '6', '2021-07-26 12:39:46', 1), (23, 'fghgfhghf@gmail.com', '4OY9K%HA', 'BMGA713', '6', '2021-07-27 12:24:47', 3), (24, 'dgdfgdfg@gmail.com', '9JKOLVXw', 'BMGA837', '6', '2021-07-27 12:33:43', 3), (25, 'dfgfgdfgdfg@gmail.com', '4#(2zQxb', 'BMGA612', '6', '2021-07-27 12:40:35', 1), (26, 'dfgdfgdf@ggg.com', '#7P63%FH', 'RMGA841', '7', '2021-07-28 07:23:40', 1), (27, 'jkjklj@gmail.com', 'Agz5rGV%', 'RMGA860', '7', '2021-07-28 07:25:26', 1), (28, 'vcbcvb@gmail.com', 'lIBesxyW', 'RMGA859', '7', '2021-07-28 09:47:05', 1), (29, 'dfgdfgdf@ggg.com', 'Gjab8ZQe', 'SMGA694', '5', '2021-07-28 09:58:43', 3), (30, 'dfgdfgdf@ggg.com', 'cMk0UAIB', 'F21002', '4', '2021-07-28 11:38:40', 0), (31, 'saviomanblue@gmail.com', '7qWtvJx#', 'TA21001', '3', '2021-07-28 12:42:39', 0), (32, 'gfhgfh@gmail.com', 'Savio@234', 'TA21002', '3', '2021-07-29 05:35:09', 1), (33, 'saviomanblue@gmail.com', '(6zYqpuI', 'CU2100001', '2', '2021-07-29 06:00:28', 0), (34, 'ghgjgj@gmail.com', '1XaOD!Fr', 'CU2100002', '2', '2021-07-29 06:00:42', 0), (35, 'dfgdfgdfg@gmail.com', 'E54MjVqb', 'CU2100003', '2', '2021-07-29 06:21:54', 0), (36, 'dfgfgfdg@gmail.com', 'oXYLI7r@', 'CU2100004', '2', '2021-07-29 06:22:07', 0), (37, 'dfgdfgd@gmail.com', 'zx^Z8m#N', 'CU2100005', '2', '2021-07-29 09:47:19', 1), (38, 'ghjhgj@gmail.com', 'yUFtX%GJ', 'CU2100006', '2', '2021-07-29 09:48:58', 0), (39, 'sadsads@gmail.com', 'LdmcWiG8', 'BMGA653', '6', '2021-07-29 11:29:35', 3), (40, 'fsdfsdfsd@gmail.com', '*fLAX^W9', 'F21003', '4', '2021-07-30 05:03:19', 1), (41, 'vgjfgfg@gmail.com', 'BtjUuz(L', 'TA21003', '3', '2021-07-30 05:19:05', 0), (42, 'jfgfg@gmail.com', 'LoArNR6g', 'CU2100007', '2', '2021-07-30 06:25:58', 1), (43, 'dfgdfgdf@gmial.com', 'dnCfUR8)', 'CU2100008', '2', '2021-07-30 07:36:56', 1), (44, 'gddg@gmail.com', 'MNK1no3D', 'TA21004', '3', '2021-08-02 10:08:31', 1), (45, 'saviosmanblussse@gmail.com', 'z5RT^yIY', 'TA21005', '3', '2021-08-03 10:02:33', 0), (46, 'sadsads@gmail.com', 'IRZ6x7!@', 'BMGA095', '6', '2021-08-05 09:54:46', 1); -- -------------------------------------------------------- -- -- Table structure for table `logs` -- CREATE TABLE `logs` ( `id` int(11) NOT NULL, `user_id` varchar(99) NOT NULL, `title` varchar(255) NOT NULL, `message` text NOT NULL, `message2` text NOT NULL, `reference_no` varchar(255) NOT NULL, `register_by` varchar(100) NOT NULL COMMENT ' 0-deleted 1-admin 2-customer 3-TA 4-F 5-SM 6-BM 7-RM', `from_whom` int(11) NOT NULL, `operation` varchar(99) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp(), `status` varchar(99) NOT NULL DEFAULT '1' COMMENT ' 0-deleted 1-registered 2- Deleted' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `logs` -- INSERT INTO `logs` (`id`, `user_id`, `title`, `message`, `message2`, `reference_no`, `register_by`, `from_whom`, `operation`, `register_date`, `status`) VALUES (1, '', 'Add Branch Manager', 'Added New Branch Manager', 'Added New Branch Manager', 'RMGA001', '7', 1, '', '2021-07-27 11:35:46', '1'), (2, '', 'Add Branch Manager', 'Added New Branch Manager by RMGA001', 'Added New Branch Manager by RMGA001', 'RMGA001', '7', 1, '', '2021-07-27 12:33:39', '1'), (3, '', 'Add Branch Manager', 'Added New Branch Manager by RMGA352', 'Added New Branch Manager by RMGA352', 'RMGA352', '7', 1, '', '2021-07-27 12:37:52', '1'), (4, '', 'Confirm Branch Manager', 'BMGA612 has been approved', 'BMGA612 has been approved', 'RMGA352', '7', 1, '', '2021-07-27 12:40:35', '1'), (5, '', 'Delete Branch Manager', 'Deleted Branch Manager from registered list', 'Deleted Branch Manager from registered list', 'RMGA001', '7', 1, '', '2021-07-28 05:57:18', '1'), (6, '', 'Delete Branch Manager', 'Deleted Branch Manager(BMGA713) from registered list', 'Deleted Branch Manager(BMGA713) from registered list', 'RMGA001', '7', 1, '', '2021-07-28 06:01:12', '1'), (7, '', 'Add Branch Manager', 'Added New Branch Manager by RMGA003', 'Added New Branch Manager by RMGA003', 'RMGA003', '7', 1, '', '2021-07-28 06:02:25', '1'), (8, '', 'Delete Branch Manager', 'Deleted Branch Manager from pending list', 'Deleted Branch Manager from pending list', 'RMGA003', '7', 1, '', '2021-07-28 06:02:34', '1'), (9, 'BMGA612', 'Edit Branch Manager', 'Updated Branch Manager Details from registered list', 'Updated Branch Manager Details from registered list', 'undefined', '7', 1, '', '2021-07-28 07:01:53', '1'), (10, 'BMGA814', 'Edit Branch Manager', 'BMGA814 Details has been updated from registered list', 'BMGA814 Details has been updated from registered list', 'undefined', '7', 1, '', '2021-07-28 07:04:16', '1'), (11, '', 'Add Branch Manager', 'Added New Branch Manager by RMGA003', 'Added New Branch Manager by RMGA003', 'RMGA003', '7', 1, '', '2021-07-28 07:08:47', '1'), (12, '11', 'Edit Branch Manager', '11 Details has been updated from pending list', '11 Details has been updated from pending list', 'undefined', '7', 1, '', '2021-07-28 07:09:08', '1'), (13, '11', 'Edit Branch Manager', 'Updated Branch Manager Details from pending list', 'Updated Branch Manager Details from pending list', 'undefined', '7', 1, '', '2021-07-28 07:11:24', '1'), (14, 'BMGA096', 'Edit Branch Manager', 'BMGA096 Details has been updated from registered list', 'BMGA096 Details has been updated from registered list', 'undefined', '7', 1, '', '2021-07-28 07:11:48', '1'), (15, '', 'Delete Branch Manager', 'Deleted Branch Manager from pending list', 'Deleted Branch Manager from pending list', 'RMGA003', '7', 1, '', '2021-07-28 07:12:18', '1'), (16, '', 'Add Regional Manager', 'Added New Regional Manager', 'Added New Regional Manager', '1', '1', 1, '', '2021-07-28 07:19:11', '1'), (17, '', 'Add Regional Manager', 'Added New Regional Manager', 'Added New Regional Manager', '1', '1', 1, '', '2021-07-28 07:25:15', '1'), (18, 'RMGA860', 'Confirm Regional Manager', 'RMGA860 has been approved', 'RMGA860 has been approved', '1', '1', 1, '', '2021-07-28 07:25:26', '1'), (19, '', 'Delete Regional Manager', 'Deleted Regional Manager(RMGA352) from registered list', 'Deleted Regional Manager(RMGA352) from registered list', '1', '1', 1, '', '2021-07-28 07:31:22', '1'), (20, '', 'Delete Regional Manager', 'Deleted Regional Manager(RMGA003) from registered list', 'Deleted Regional Manager(RMGA003) from registered list', '1', '1', 1, '', '2021-07-28 09:40:07', '1'), (21, 'RMAS003', 'Edit Regional Manager', 'RMAS003 Details has been updated from registered list', 'RMAS003 Details has been updated from registered list', '1', '1', 1, '', '2021-07-28 09:44:39', '1'), (22, '', 'Add Regional Manager', 'Added New Regional Manager', 'Added New Regional Manager', '1', '1', 1, '', '2021-07-28 09:46:17', '1'), (23, '10', 'Edit Regional Manager', 'Updated Regional Manager Details from pending list', 'Updated Regional Manager Details from pending list', '1', '1', 1, '', '2021-07-28 09:46:34', '1'), (24, 'RMGA859', 'Confirm Regional Manager', 'RMGA859 has been approved', 'RMGA859 has been approved', '1', '1', 1, '', '2021-07-28 09:47:05', '1'), (25, '', 'Add Sales Manager', 'Added New Sales Manager by BMGA814', 'Added New Sales Manager by BMGA814', 'BMGA814', '6', 1, '', '2021-07-28 09:52:09', '1'), (26, 'SMGA694', 'Confirm Sales Manager', 'SMGA694 has been approved', 'SMGA694 has been approved', 'BMGA814', '6', 1, '', '2021-07-28 09:58:43', '1'), (27, '', 'Delete Sales Manager', 'Deleted Sales Manager(SMGA910) from registered list', 'Deleted Sales Manager(SMGA910) from registered list', 'BMGA096', '6', 1, '', '2021-07-28 10:24:48', '1'), (28, '', 'Add Sales Manager', 'Added New Sales Manager by BMGA612', 'Added New Sales Manager by BMGA612', 'BMGA612', '6', 1, '', '2021-07-28 10:33:46', '1'), (29, '', 'Delete Sales Manager', 'Deleted Sales Manager from pending list', 'Deleted Sales Manager from pending list', 'BMGA612', '6', 1, '', '2021-07-28 10:33:50', '1'), (30, 'SMGA206', 'Edit Sales Manager', 'SMGA206 Details has been updated from registered list', 'SMGA206 Details has been updated from registered list', 'BMGA096', '6', 1, '', '2021-07-28 10:56:29', '1'), (31, '', 'Add Sales Manager', 'Added New Sales Manager by BMGA612', 'Added New Sales Manager by BMGA612', 'BMGA612', '6', 1, '', '2021-07-28 10:57:26', '1'), (32, '10', 'Edit Sales Manager', 'Updated Branch Manager Details from pending list', 'Updated Branch Manager Details from pending list', 'BMGA612', '6', 1, '', '2021-07-28 10:57:34', '1'), (33, 'F21001', 'Edit Franchisee', 'F21001 Details has been updated from registered list', 'F21001 Details has been updated from registered list', 'SMGA206', '5', 1, '', '2021-07-28 11:36:38', '1'), (34, '', 'Delete Franchisee', 'Deleted Franchisee(F21001) from registered list', 'Deleted Franchisee(F21001) from registered list', 'SMGA206', '5', 1, '', '2021-07-28 11:36:53', '1'), (35, '', 'Add Franchisee', 'Added New Franchisee by SMGA206', 'Added New Franchisee by SMGA206', 'SMGA206', '5', 1, '', '2021-07-28 11:37:56', '1'), (36, '2', 'Edit Franchisee', 'Updated Franchisee Details from pending list', 'Updated Franchisee Details from pending list', 'SMGA206', '5', 1, '', '2021-07-28 11:38:18', '1'), (37, 'F21002', 'Confirm Franchisee', 'F21002 has been approved', 'F21002 has been approved', 'SMGA206', '5', 1, '', '2021-07-28 11:38:40', '1'), (38, '', 'Add Travel Agent', 'Added new Travel Agent by F21002', 'Added new Travel Agent by F21002', 'F21002', '4', 1, '', '2021-07-28 12:42:02', '1'), (39, '1', 'Edit Travel Agent', 'Updated Travel Agent details from pending list', 'Updated Travel Agent details from pending list', 'F21002', '4', 1, '', '2021-07-28 12:42:24', '1'), (40, 'TA21001', 'Confirm Travel Agent', 'TA21001 has been approved', 'TA21001 has been approved', 'F21002', '4', 1, '', '2021-07-28 12:42:39', '1'), (41, 'TA21001', 'Edit Travel Agent', 'TA21001 Details has been updated from registered list', 'TA21001 Details has been updated from registered list', 'F21002', '4', 1, '', '2021-07-28 12:42:58', '1'), (42, '', 'Delete Franchisee', 'Deleted Franchisee(TA21001) from registered list', 'Deleted Franchisee(TA21001) from registered list', 'F21002', '4', 1, '', '2021-07-28 12:43:14', '1'), (43, '', 'Add Franchisee', 'Added new Franchisee by SMGA470', 'Added new Franchisee by SMGA470', 'SMGA470', '5', 1, '', '2021-07-29 05:27:59', '1'), (44, '3', 'Edit Franchisee', 'Updated Franchisee details from pending list', 'Updated Franchisee details from pending list', 'SMGA470', '5', 1, '', '2021-07-29 05:28:46', '1'), (45, 'F21002', 'Edit Franchisee', 'F21002 Details has been updated from registered list', 'F21002 Details has been updated from registered list', 'SMGA206', '5', 1, '', '2021-07-29 05:30:19', '1'), (46, '3', 'Edit Franchisee', 'Updated Franchisee details from pending list', 'Updated Franchisee details from pending list', 'SMGA470', '5', 1, '', '2021-07-29 05:30:30', '1'), (47, '', 'Add Travel Agent', 'Added new Travel Agent by F21002', 'Added new Travel Agent by F21002', 'F21002', '4', 1, '', '2021-07-29 05:34:38', '1'), (48, '2', 'Edit Travel Agent', 'Updated Travel Agent details from pending list', 'Updated Travel Agent details from pending list', 'F21002', '4', 1, '', '2021-07-29 05:34:58', '1'), (49, 'TA21002', 'Confirm Travel Agent', 'TA21002 has been approved', 'TA21002 has been approved', 'F21002', '4', 1, '', '2021-07-29 05:35:09', '1'), (50, 'TA21002', 'Edit Travel Agent', 'TA21002 Details has been updated from registered list', 'TA21002 Details has been updated from registered list', 'F21002', '4', 1, '', '2021-07-29 05:35:30', '1'), (51, '', 'Add Customer', 'Added new customer through B2C', 'Added new customer through B2C', '', '1', 1, '', '2021-07-29 05:45:52', '1'), (52, '', 'Add Customer', 'Added new customer by TA21002', 'Added new customer by TA21002', 'TA21002', '3', 1, '', '2021-07-29 05:47:04', '1'), (53, 'CU2100001', 'Confirm Customer', 'CU2100001 has been approved', 'CU2100001 has been approved', '1', '1', 1, '', '2021-07-29 06:00:28', '1'), (54, 'CU2100002', 'Confirm Customer', 'CU2100002 has been approved', 'CU2100002 has been approved', 'TA21002', '3', 1, '', '2021-07-29 06:00:42', '1'), (55, '', 'Delete Customer', 'Deleted Customer(CU2100001) from registered list', 'Deleted Customer(CU2100001) from registered list', '', '3', 1, '', '2021-07-29 06:14:35', '1'), (56, '', 'Delete Customer', 'Deleted Customer(CU2100002) from registered list', 'Deleted Customer(CU2100002) from registered list', 'TA21002', '3', 1, '', '2021-07-29 06:15:34', '1'), (57, '', 'Delete Customer', 'Deleted Customer(CU2100001) from registered list', 'Deleted Customer(CU2100001) from registered list', '', '3', 1, '', '2021-07-29 06:19:11', '1'), (58, '', 'Delete Customer', 'Deleted Customer(CU2100002) from registered list', 'Deleted Customer(CU2100002) from registered list', 'TA21002', '3', 1, '', '2021-07-29 06:19:56', '1'), (59, '', 'Add Customer', 'Added new customer through B2C', 'Added new customer through B2C', '', '1', 1, '', '2021-07-29 06:20:51', '1'), (60, '', 'Add Customer', 'Added new customer by TA21002', 'Added new customer by TA21002', 'TA21002', '3', 1, '', '2021-07-29 06:21:48', '1'), (61, 'CU2100003', 'Confirm Customer', 'CU2100003 has been approved', 'CU2100003 has been approved', 'TA21002', '3', 1, '', '2021-07-29 06:21:54', '1'), (62, 'CU2100004', 'Confirm Customer', 'CU2100004 has been approved', 'CU2100004 has been approved', '1', '1', 1, '', '2021-07-29 06:22:07', '1'), (63, '', 'Delete Customer', 'Deleted Customer(CU2100004) from registered list', 'Deleted Customer(CU2100004) from registered list', '', '3', 1, '', '2021-07-29 06:22:13', '1'), (64, '', 'Delete Customer', 'Deleted Customer(CU2100003) from registered list', 'Deleted Customer(CU2100003) from registered list', 'TA21002', '3', 1, '', '2021-07-29 06:22:24', '1'), (65, '', 'Add Customer', 'Added new customer through B2C', 'Added new customer through B2C', '', '1', 1, '', '2021-07-29 09:46:55', '1'), (66, '5', 'Edit Customer', 'Updated Customer details from pending list', 'Updated Customer details from pending list', '', '3', 1, '', '2021-07-29 09:47:07', '1'), (67, 'CU2100005', 'Confirm Customer', 'CU2100005 has been approved', 'CU2100005 has been approved', '1', '1', 1, '', '2021-07-29 09:47:19', '1'), (68, 'CU2100005', 'Edit Customer', 'CU2100005 Details has been updated from registered list', 'CU2100005 Details has been updated from registered list', '', '3', 1, '', '2021-07-29 09:47:28', '1'), (69, '', 'Add Customer', 'Added new customer by TA21002', 'Added new customer by TA21002', 'TA21002', '3', 1, '', '2021-07-29 09:48:28', '1'), (70, '6', 'Edit Customer', 'Updated Customer details from pending list', 'Updated Customer details from pending list', 'TA21002', '3', 1, '', '2021-07-29 09:48:38', '1'), (71, 'CU2100006', 'Confirm Customer', 'CU2100006 has been approved', 'CU2100006 has been approved', 'TA21002', '3', 1, '', '2021-07-29 09:48:58', '1'), (72, 'CU2100006', 'Edit Customer', 'CU2100006 Details has been updated from registered list', 'CU2100006 Details has been updated from registered list', 'TA21002', '3', 1, '', '2021-07-29 09:49:08', '1'), (73, '', 'Add Branch Manager', 'Added New Branch Manager by You', '', 'RMGA001', '7', 7, 'add', '2021-07-29 11:16:09', '1'), (74, 'BMGA653', 'Confirm Branch Manager', 'BMGA653 has been approved', 'BMGA653 has been approved', 'RMGA001', '7', 1, '', '2021-07-29 11:29:35', '1'), (75, '', 'Delete Branch Manager', 'You have deleted Branch Manager with id BMGA653', '', 'RMGA001', '7', 7, 'delete', '2021-07-29 11:30:30', '1'), (76, 'BMGA096', 'Edit Branch Manager', 'BMGA096 details has been updated', '', 'RMGA001', '7', 7, 'update', '2021-07-29 11:47:29', '1'), (77, '', 'Delete Sales Manager', 'You have deleted Sales Manager with ID SMGA694', '', 'BMGA814', '6', 6, 'delete', '2021-07-29 12:20:02', '1'), (78, '', 'Add Sales Manager', 'Added New Sales Manager by You', '', 'BMGA814', '6', 6, 'add', '2021-07-29 12:32:03', '1'), (79, 'SMGA205', 'Edit Sales Manager', 'SMGA205 details has been updated', '', 'BMGA814', '6', 6, 'update', '2021-07-29 12:40:59', '1'), (80, 'SMGA470', 'Edit Sales Manager', 'SMGA470 details has been updated', '', 'BMGA814', '6', 6, 'update', '2021-07-29 12:41:18', '1'), (81, '', 'Delete Sales Manager', 'You have deleted Sales Manager with ID SMGA470', '', 'BMGA814', '6', 6, 'delete', '2021-07-29 12:41:43', '1'), (82, 'SMGA205', 'Edit Sales Manager', 'SMGA205 details has been updated', '', 'BMGA814', '6', 6, 'update', '2021-07-30 04:43:20', '1'), (83, 'F21002', 'Edit Franchisee', 'F21002 details has been updated', '', 'SMGA206', '5', 5, 'update', '2021-07-30 05:01:52', '1'), (84, '', 'Delete Franchisee', 'You have deleted Franchisee with ID F21002', '', 'SMGA206', '5', 5, 'delete', '2021-07-30 05:02:04', '1'), (85, '', 'Add Franchisee', 'Added New Franchisee by You', '', 'SMGA206', '5', 5, 'add', '2021-07-30 05:03:00', '1'), (86, 'F21003', 'Confirm Franchisee', 'F21003 has been approved', 'F21003 has been approved', 'SMGA206', '5', 1, '', '2021-07-30 05:03:19', '1'), (87, 'F21003', 'Edit Franchisee', 'F21003 details has been updated', '', 'SMGA206', '5', 5, 'update', '2021-07-30 05:03:37', '1'), (88, '', 'Add Travel Agent', 'Added New Travel Agent by You', '', 'F21003', '4', 4, 'add', '2021-07-30 05:18:47', '1'), (89, 'TA21003', 'Confirm Travel Agent', 'TA21003 has been approved', 'TA21003 has been approved', 'F21003', '4', 1, '', '2021-07-30 05:19:05', '1'), (90, 'TA21003', 'Edit Travel Agent', 'TA21003 details has been updated', '', 'F21003', '4', 4, 'update', '2021-07-30 05:19:14', '1'), (91, '', 'Delete Travel Agent', 'You have deleted Travel Agent with ID ', '', 'F21003', '4', 4, 'delete', '2021-07-30 05:19:25', '1'), (92, '', 'Delete Travel Agent', 'You have deleted Travel Agent with ID ', '', 'F21003', '4', 4, 'delete', '2021-07-30 05:19:39', '1'), (93, '', 'Delete Travel Agent', 'You have deleted Travel Agent with ID TA21003', '', 'F21003', '4', 4, 'delete', '2021-07-30 05:21:03', '1'), (94, 'CU2100006', 'Edit Customer', 'CU2100006 details has been updated', '', 'TA21002', '3', 3, 'update', '2021-07-30 06:21:43', '1'), (95, '', 'Delete Customer', 'You have deleted Customer with ID CU2100006', '', 'TA21002', '3', 3, 'delete', '2021-07-30 06:23:37', '1'), (96, '', 'Add Customer', 'Added New Customer by You', '', 'TA21002', '3', 3, 'add', '2021-07-30 06:25:27', '1'), (97, 'CU2100007', 'Confirm Customer', 'CU2100007 has been approved', 'CU2100007 has been approved', 'TA21002', '3', 1, '', '2021-07-30 06:25:58', '1'), (98, 'CU2100007', 'Edit Customer', 'CU2100007 details has been updated', '', 'TA21002', '3', 3, 'update', '2021-07-30 06:26:47', '1'), (99, '', 'Change Password', 'You have change your password', '', 'TA21002', '3', 3, 'update', '2021-07-30 07:08:50', '1'), (100, '', 'Update Profile Details', 'You have updated your profile details', '', 'TA21002', '3', 3, 'update', '2021-07-30 07:15:11', '1'), (101, '', 'Update Profile Details', 'You have updated your profile details', '', 'TA21002', '3', 3, 'update', '2021-07-30 07:16:50', '1'), (102, '', 'Update Profile Details', 'You have updated your profile details', '', 'TA21002', '3', 3, 'update', '2021-07-30 07:20:35', '1'), (103, '', 'Update Profile Details', 'You have updated your profile details', '', 'CU2100007', '2', 2, 'update', '2021-07-30 07:25:51', '1'), (104, '', 'Add Customer', 'Added new customer by TA21002', 'Added new customer by TA21002', 'TA21002', '3', 1, '', '2021-07-30 07:36:43', '1'), (105, 'CU2100008', 'Confirm Customer', 'CU2100008 has been approved', 'CU2100008 has been approved', 'TA21002', '3', 1, '', '2021-07-30 07:36:56', '1'), (106, 'TA21002', 'Edit Travel Agent', 'TA21002 Details has been updated from registered list', 'TA21002 Details has been updated from registered list', 'F21002', '4', 1, '', '2021-08-02 10:05:26', '1'), (107, '', 'Add Travel Agent', 'Added new Travel Agent by F21003', 'Added new Travel Agent by F21003', 'F21003', '4', 1, '', '2021-08-02 10:08:28', '1'), (108, 'TA21004', 'Confirm Travel Agent', 'TA21004 has been approved', 'TA21004 has been approved', 'F21003', '4', 1, '', '2021-08-02 10:08:32', '1'), (109, '', 'Add Travel Agent', 'Added new Travel Agent by F21003', 'Added new Travel Agent by F21003', 'F21003', '4', 1, '', '2021-08-02 10:09:31', '1'), (110, 'F21003', 'Edit Franchisee', 'F21003 Details has been updated from registered list', 'F21003 Details has been updated from registered list', 'SMGA206', '5', 1, '', '2021-08-02 10:13:08', '1'), (111, 'SMGA206', 'Edit Sales Manager', 'SMGA206 Details has been updated from registered list', 'SMGA206 Details has been updated from registered list', 'BMGA096', '6', 1, '', '2021-08-02 10:19:38', '1'), (112, 'CU2100007', 'Edit Customer', 'CU2100007 Details has been updated from registered list', 'CU2100007 Details has been updated from registered list', 'TA21002', '3', 1, '', '2021-08-03 09:44:00', '1'), (113, '5', 'Edit Travel Agent', 'Updated Travel Agent details from pending list', 'Updated Travel Agent details from pending list', 'F21003', '4', 1, '', '2021-08-03 10:01:33', '1'), (114, 'TA21005', 'Confirm Travel Agent', 'TA21005 has been approved', 'TA21005 has been approved', 'F21003', '4', 1, '', '2021-08-03 10:02:33', '1'), (115, '', 'Delete Travel Agent', 'Deleted Travel Agent(TA21005) from registered list', 'Deleted Travel Agent(TA21005) from registered list', 'F21003', '4', 1, '', '2021-08-03 10:04:18', '1'), (116, '', 'Update Profile Details', 'You have updated your profile details', '', 'BMGA612', '6', 6, 'update', '2021-08-04 07:54:17', '1'), (117, '', 'Update Profile Details', 'You have updated your profile details', '', 'TA21004', '3', 3, 'update', '2021-08-04 09:54:09', '1'), (118, '9', 'Edit Customer', 'Updated Customer details from pending list', 'Updated Customer details from pending list', '', '3', 1, '', '2021-08-05 07:13:50', '1'), (119, 'RMGA841', 'Edit Regional Manager', 'RMGA841 Details has been updated from registered list', 'RMGA841 Details has been updated from registered list', '1', '1', 1, '', '2021-08-05 07:14:11', '1'), (120, 'RMGA352', 'Edit Regional Manager', 'RMGA352 Details has been updated from registered list', 'RMGA352 Details has been updated from registered list', '1', '1', 1, '', '2021-08-05 07:18:57', '1'), (121, 'RMGA859', 'Edit Regional Manager', 'RMGA859 Details has been updated from registered list', 'RMGA859 Details has been updated from registered list', '1', '1', 1, '', '2021-08-05 09:14:48', '1'), (122, '', 'Add Franchisee', 'Added new Franchisee by SMGA205', 'Added new Franchisee by SMGA205', 'SMGA205', '5', 1, '', '2021-08-05 09:16:24', '1'), (123, 'TA21002', 'Edit Travel Agent', 'TA21002 Details has been updated from registered list', 'TA21002 Details has been updated from registered list', 'F21002', '4', 1, '', '2021-08-05 09:20:21', '1'), (124, '9', 'Edit Customer', 'Updated Customer details from pending list', 'Updated Customer details from pending list', '', '3', 1, '', '2021-08-05 09:21:23', '1'), (125, 'BMGA095', 'Confirm Branch Manager', 'BMGA095 has been approved', 'BMGA095 has been approved', 'RMGA001', '7', 1, '', '2021-08-05 09:54:46', '1'), (126, '12', 'Edit Branch Manager', 'Updated Branch Manager Details from pending list', 'Updated Branch Manager Details from pending list', 'RMGA001', '7', 1, '', '2021-08-05 09:54:59', '1'), (127, '', 'Delete Branch Manager', 'Deleted Branch Manager(BMGA096) from registered list', 'Deleted Branch Manager(BMGA096) from registered list', 'RMGA001', '7', 1, '', '2021-08-05 10:12:10', '1'), (128, '12', 'Edit Branch Manager', 'Updated Branch Manager Details from pending list', 'Updated Branch Manager Details from pending list', 'RMGA001', '7', 1, '', '2021-08-05 10:12:18', '1'), (129, 'CU2100008', 'Edit Customer', 'CU2100008 Details has been updated from registered list', 'CU2100008 Details has been updated from registered list', 'TA21002', '3', 1, '', '2021-08-05 10:13:10', '1'); -- -------------------------------------------------------- -- -- Table structure for table `regional_manager` -- CREATE TABLE `regional_manager` ( `id` int(11) NOT NULL, `regional_manager_id` varchar(255) NOT NULL, `firstname` varchar(255) NOT NULL, `lastname` varchar(255) NOT NULL, `email` varchar(100) NOT NULL, `country_code` varchar(3) NOT NULL, `contact_no` varchar(15) NOT NULL, `head_office` varchar(99) NOT NULL, `zone` varchar(99) NOT NULL, `region` varchar(99) NOT NULL, `date_of_birth` date NOT NULL, `age` varchar(5) NOT NULL, `gender` varchar(10) NOT NULL, `country` varchar(255) NOT NULL, `state` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `pincode` varchar(8) NOT NULL, `address` text NOT NULL, `profile_pic` varchar(255) NOT NULL, `kyc` varchar(255) NOT NULL, `pan_card` varchar(255) NOT NULL, `aadhar_card` varchar(255) NOT NULL, `voting_card` varchar(255) NOT NULL, `bank_passbook` varchar(255) NOT NULL, `registrant` varchar(100) NOT NULL, `reference_no` varchar(255) NOT NULL, `register_by` varchar(100) NOT NULL, `user_type` int(11) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT '0-deleted 1-registered 2-pending 3-removed' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `regional_manager` -- INSERT INTO `regional_manager` (`id`, `regional_manager_id`, `firstname`, `lastname`, `email`, `country_code`, `contact_no`, `head_office`, `zone`, `region`, `date_of_birth`, `age`, `gender`, `country`, `state`, `city`, `pincode`, `address`, `profile_pic`, `kyc`, `pan_card`, `aadhar_card`, `voting_card`, `bank_passbook`, `registrant`, `reference_no`, `register_by`, `user_type`, `register_date`, `deleted_date`, `status`) VALUES (1, 'RMGA001', 'savio', 'MIRANDA', 'saviomanblue@gmail.com', '91', '8208286425', 'panjim', 'India', 'GOA', '2000-07-07', '21', 'male', '1', '6', '4', '403 521', 'fdgdfgdfgdfgdfgd', 'profile_pic/220720210846565c1lDgi.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-22 06:49:38', '', 1), (2, 'RMKL002', 'uuhuh', 'lklk', 'saviomaggugnblue@gmail.com', '91', '0828286425', 'panjim', 'India', 'gvgh', '2001-07-09', '20', 'male', '1', '12', 'fghf', '765432', 'fdgdfgdfgdfgdfgd', 'profile_pic/2207202108484530100.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-22 06:49:43', '', 1), (3, 'RMGA003', 'hghg', 'gkgk', 'saviomanvhvblue@gmail.com', '91', '0820828645', 'panjim', 'India', 'hjgg', '1998-07-15', '23', 'male', '1', '6', '8', '403 518', 'fdgsdfsdfsdfsdfsf', 'profile_pic/220720210849335c1lDgi.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-28 09:40:07', '2021-07-28 15:10:07', 3), (4, 'RMAS003', 'fyfjf ok', 'hghgq', 'nbnb@gamil.com', '91', '0820826425', 'panjim', 'India', 'hghjg', '1998-07-14', '23', 'male', '1', '3', 'City not available', '765456', 'fdgsdfsdfsdfsdfsf', 'profile_pic/220720210851545c1lDgi.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-28 09:44:39', '', 1), (5, 'BMGA485', 'ghgfhgfhf', 'gfhghfgh', 'fghf@gmail.com', '91', '0820828647', 'fghgfhf', 'hgfh', 'fghfgh', '2001-07-13', '20', 'male', '1', '6', '11', '403 808', 'fhghfhggfhgfh', 'profile_pic/22072021132953at2.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-22 11:34:51', '2021-07-22 17:04:51', 3), (6, 'RMGA352', 'tony', 'miranda', 'tony@gmail.com', '91', '0820828643', 'India', 'gfdgfgfg', 'fdgdfgdfg', '1992-07-08', '29', 'male', '1', '6', '13', '403 202', 'fdgsdfsdfsdfsdfsf', 'profile_pic/26072021131440at3.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-28 07:31:21', '2021-07-28 13:01:21', 3), (7, 'RMGA841', 'fdgfgfd', 'fdgdfg', 'dfgdfgdf@ggg.com', '91', '7654345654', 'gfhghgf', 'fghghfg', 'gfhgfhgfhg', '2000-07-24', '21', 'male', '1', '6', '6', '403 601', 'ghfhgfhfgh', 'profile_pic/28072021091845at3.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-28 07:23:40', '', 1), (8, '', 'fdgfgfd', 'fdgdfg', 'dfgdfgdf@ggg.com', '91', '7654345654', 'gfhghgf', 'fghghfg', 'gfhgfhgfhg', '2000-07-24', '21', 'male', '1', '6', '6', '403 601', 'ghfhgfhfgh', 'profile_pic/28072021091845at3.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-28 07:19:19', '2021-07-28 12:49:19', 0), (9, 'RMGA860', 'hgjghjgj', 'jkghkjgkjg', 'jkjklj@gmail.com', '91', '7867564534', 'jjlhjhhj', 'klhjhhkhh', 'jfjgfgff', '1996-07-14', '25', 'male', '1', '6', '13', '403 202', 'bkjgbkgkghg', 'profile_pic/28072021092513at3.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-28 07:25:25', '', 1), (10, 'RMGA859', 'cbbcvb ok', 'cvbcvbcvb', 'vcbcvb@gmail.com', '91', '8765654354', 'gfhgfhgfhgfh', 'ghgfhghg', 'hgfhfgh', '2001-07-13', '20', 'female', '1', '6', '12', '403 201', 'ghgfhgfhgfh', 'profile_pic/28072021114615at2.jpg', '', '', '', '', '', '', '', '', 7, '2021-07-28 09:47:05', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `sales_manager` -- CREATE TABLE `sales_manager` ( `id` int(11) NOT NULL, `sales_manager_id` varchar(255) NOT NULL, `firstname` varchar(255) NOT NULL, `lastname` varchar(255) NOT NULL, `email` varchar(100) NOT NULL, `country_code` varchar(3) NOT NULL, `contact_no` varchar(15) NOT NULL, `head_office` varchar(99) NOT NULL, `zone` varchar(99) NOT NULL, `region` varchar(99) NOT NULL, `date_of_birth` date NOT NULL, `age` varchar(5) NOT NULL, `gender` varchar(10) NOT NULL, `country` varchar(255) NOT NULL, `state` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `pincode` varchar(8) NOT NULL, `address` text NOT NULL, `profile_pic` varchar(255) NOT NULL, `kyc` varchar(255) NOT NULL, `pan_card` varchar(255) NOT NULL, `aadhar_card` varchar(255) NOT NULL, `voting_card` varchar(255) NOT NULL, `bank_passbook` varchar(255) NOT NULL, `registrant` varchar(100) NOT NULL, `reference_no` varchar(255) NOT NULL, `register_by` varchar(100) NOT NULL, `user_type` int(11) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT '0-deleted 1-registered 2-pending 3-removed' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `sales_manager` -- INSERT INTO `sales_manager` (`id`, `sales_manager_id`, `firstname`, `lastname`, `email`, `country_code`, `contact_no`, `head_office`, `zone`, `region`, `date_of_birth`, `age`, `gender`, `country`, `state`, `city`, `pincode`, `address`, `profile_pic`, `kyc`, `pan_card`, `aadhar_card`, `voting_card`, `bank_passbook`, `registrant`, `reference_no`, `register_by`, `user_type`, `register_date`, `deleted_date`, `status`) VALUES (1, 'SMGA205', 'savio', 'fgjfjgf', 'saviomanblue@gmail.com', '91', '0820928642', 'panjim', 'India', 'Goa', '2001-07-09', '21', 'male', '1', '6', '10', '403 701', 'fdgsdfsdfsdfsdfsf', 'profile_pic/22072021135104author.jpg', 'kyc/23072021142141at3.jpg', '', '', '', '', 'savio MIRANDA', 'BMGA814', '6', 5, '2021-07-23 12:21:43', '', 1), (2, 'SMGA910', 'gfbhgfhg', 'fghfgh', 'fghg@gmail.com', '91', '0820828642', 'gfhfgh', 'fdgdgdf', 'dfgfgf', '2000-07-19', '21', 'male', '1', '6', '12', '403 201', 'fdgsdfsdfsdfsdfsf', 'profile_pic/22072021134023at3.jpg', '', '', '', '', '', 'sdfdsfdsf dsfdsfsdf', 'BMGA096', '6', 5, '2021-07-28 10:24:48', '2021-07-28 15:54:48', 3), (3, 'SMGA205', 'savio', 'fgjfjgf', 'saviomanblue@gmail.com', '91', '0820928642', 'panjim', 'India', 'Goa', '2001-07-09', '20', 'male', '1', '6', '10', '403 701', 'fdgsdfsdfsdfsdfsf', 'profile_pic/22072021135104author.jpg', 'kyc/23072021142141at3.jpg', '', '', '', '', 'sdfdsfdsf dsfdsfsdf', 'BMGA096', '6', 5, '2021-07-23 12:21:43', '2021-07-23 10:04:03', 3), (4, 'SMGA206', 'tony ok', 'sdfsdff', 'sdfsdf@gmail.com', '91', '0820586425', 'sdfdfsdf', 'sdfdsfsdf', 'sdfsdfsd', '1996-07-14', '25', 'male', '1', '6', '11', '403 808', 'sdfdfsdfsdfsd', 'profile_pic/22072021141347author.jpg', '', '', '', '', '', 'sdfdsfdsf dsfdsfsdf', 'BMGA096', '6', 5, '2021-08-02 10:19:38', '', 1), (5, 'SMGA246', 'kmjhkhjk', 'hjkhjkjh', 'khjkhj@gmail.com', '91', '0820828632', 'panjim', 'dsff', 'Goa', '1999-07-06', '22', 'male', '1', '6', '15', '403 716', 'fdgsdfsdfsdfsdfsf', 'profile_pic/22072021143935at3.jpg', '', '', '', '', '', 'sdfdsfdsf dsfdsfsdf', 'BMGA096', '6', 5, '2021-07-23 04:34:28', '2021-07-23 10:04:28', 3), (6, 'SMGA756', 'gfgfjfj', 'ghgfhgfhfg', 'fhfh@gmail.com', '91', '3245328765', 'India', 'Panjim', 'Goa', '1989-07-15', '32', 'female', '1', '6', '15', '403 716', 'nbghnghjghjhjghj', 'profile_pic/23072021131123at2.jpg', '', '', '', '', '', 'savio MIRANDA', 'BMGA814', '6', 5, '2021-07-23 12:24:10', '2021-07-23 17:51:59', 3), (7, 'SMGA470', 'tony', 'miranda', 'tonye@gmail.com', '91', '0708286425', 'India', 'Panjim', 'Goa', '2000-07-07', '21', 'male', '1', '6', '12', '403 201', 'ghfhgfhf', 'profile_pic/26072021130908at3.jpg', '', '', '', '', '', 'savio Miranda', 'BMGA814', '6', 5, '2021-07-29 12:41:43', '2021-07-29 18:11:43', 3), (8, 'SMGA694', 'dfgdfgfg', 'gdfgdfg', 'dfgdfgdf@ggg.com', '91', '9876787643', 'sdfsdfsdf', 'sdfdfsdfs', 'sfsdfsdf', '2000-07-14', '21', 'male', '1', '6', '13', '403 202', 'fsdffsdfsdfsdf', 'profile_pic/28072021115206at3.jpg', '', '', '', '', '', 'savio Miranda', 'BMGA814', '6', 5, '2021-07-29 12:20:02', '2021-07-29 17:50:02', 3), (9, '', 'ghhg', 'hfghgfh', 'gfhgfh@gmail.com', '91', '8976545654', 'gfhgfhfghgfh', 'fghghgfh', 'fghgfhgf', '1994-07-13', '27', 'male', '1', '6', '8', '403 518', 'hghgfhgfhfgh', 'profile_pic/28072021123345at3.jpg', '', '', '', '', '', 'fdgdfgdf ok gdfgdfgd', 'BMGA612', '6', 5, '2021-07-28 10:33:50', '2021-07-28 16:03:50', 0), (10, '', 'dgdfgfd ok', 'dfgdfgdf', 'dfgdfgdfff@ggg.com', '91', '8790873423', 'dfgdfg', 'dfdf', 'fdgdfg', '1999-06-30', '22', 'male', '1', '6', '11', '403 808', 'dfgdfgdfg', 'profile_pic/28072021125719at3.jpg', '', '', '', '', '', 'fdgdfgdf ok gdfgdfgd', 'BMGA612', '6', 5, '2021-07-28 10:57:34', '', 2), (11, '', 'bgfhgfh', 'gfhgfh', 'sadfsfviomanblue@gmail.com', '91', '0820828625', 'sdfsdfsd', 'dsfsdf', 'sdfdsfsd', '1999-07-28', '22', 'male', '1', '6', '12', '403 201', 'dfdsfdsfsdfsdfsdfsdfsd', 'profile_pic/29072021143201at3.jpg', '', '', '', '', '', 'savio Miranda', 'BMGA814', '6', 5, '2021-07-29 12:32:03', '', 2); -- -------------------------------------------------------- -- -- Table structure for table `states` -- CREATE TABLE `states` ( `id` int(11) NOT NULL, `short_name` varchar(5) NOT NULL, `state_name` varchar(255) NOT NULL, `country_id` int(11) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT '0-deleted 1-allow 2-not allow' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `states` -- INSERT INTO `states` (`id`, `short_name`, `state_name`, `country_id`, `status`) VALUES (1, 'AP', 'Andhra Pradesh', 1, 2), (2, 'AR', 'Arunachal Pradesh', 1, 2), (3, 'AS', 'Assam', 1, 2), (4, 'BR', 'Bihar', 1, 2), (5, 'CG', 'Chhattisgarh', 1, 2), (6, 'GA', 'Goa', 1, 1), (7, 'GJ', 'Gujarat', 1, 2), (8, 'HR', 'Haryana', 1, 2), (9, 'HP', 'Himachal Pradesh', 1, 2), (10, 'JH', 'Jharkhand', 1, 2), (11, 'KA', 'Karnataka', 1, 2), (12, 'KL', 'Kerala', 1, 2), (13, 'MP', 'Madhya Pradesh', 1, 2), (14, 'MH', 'Maharashtra', 1, 2), (15, 'MN', 'Manipur', 1, 2), (16, 'ML', 'Meghalaya', 1, 2), (17, 'MZ', 'Mizoram', 1, 2), (18, 'NL', 'Nagaland', 1, 2), (19, 'OR', 'Odisha', 1, 2), (20, 'PB', 'Punjab', 1, 2), (21, 'RJ', 'Rajasthan', 1, 2), (22, 'SK', 'Sikkim', 1, 2), (23, 'TN', 'Tamil Nadu', 1, 2), (24, 'TS', 'Telangana', 1, 2), (25, 'TR', 'Tripura', 1, 2), (26, 'UP', 'Uttar Pradesh', 1, 2), (27, 'UK', 'Uttarakhand', 1, 2), (28, 'WB', 'West Bengal', 1, 2); -- -------------------------------------------------------- -- -- Table structure for table `subcategory` -- CREATE TABLE `subcategory` ( `id` int(11) NOT NULL, `sub_category_name` varchar(299) NOT NULL, `description` text NOT NULL, `picture` varchar(299) NOT NULL, `category_id` int(11) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 1 COMMENT '1-present 2-deleted' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `subcategory` -- INSERT INTO `subcategory` (`id`, `sub_category_name`, `description`, `picture`, `category_id`, `register_date`, `deleted_date`, `status`) VALUES (1, 'fgfdgdfg', 'fgfdgfdgdfg', 'subcategory/090820211301175c1lDgi.jpg', 1, '2021-08-09 11:02:37', '', 1), (2, 'dsfdsfdsf', 'gdfgdfgdfgfg', 'subcategory/0908202113034620525386_1964954860185193_3693311684249777947_n.jpg', 2, '2021-08-09 11:03:51', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `travel_agent` -- CREATE TABLE `travel_agent` ( `id` int(11) NOT NULL, `travel_agent_id` varchar(255) NOT NULL, `firstname` varchar(99) NOT NULL, `lastname` varchar(99) NOT NULL, `email` varchar(100) NOT NULL, `country_code` varchar(3) NOT NULL, `contact_no` varchar(15) NOT NULL, `date_of_birth` date NOT NULL, `age` varchar(5) NOT NULL, `gender` varchar(10) NOT NULL, `country` varchar(255) NOT NULL, `state` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `pincode` varchar(8) NOT NULL, `address` text NOT NULL, `profile_pic` varchar(255) NOT NULL, `kyc` varchar(255) NOT NULL, `pan_card` varchar(255) NOT NULL, `aadhar_card` varchar(255) NOT NULL, `voting_card` varchar(255) NOT NULL, `bank_passbook` varchar(255) NOT NULL, `registrant` varchar(100) NOT NULL, `reference_no` varchar(255) NOT NULL, `register_by` varchar(100) NOT NULL COMMENT '1. admin 4.Franchisee', `user_type` int(11) NOT NULL, `register_date` timestamp NOT NULL DEFAULT current_timestamp(), `deleted_date` varchar(99) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT ' 0-deleted 1-registered 2-pending' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `travel_agent` -- INSERT INTO `travel_agent` (`id`, `travel_agent_id`, `firstname`, `lastname`, `email`, `country_code`, `contact_no`, `date_of_birth`, `age`, `gender`, `country`, `state`, `city`, `pincode`, `address`, `profile_pic`, `kyc`, `pan_card`, `aadhar_card`, `voting_card`, `bank_passbook`, `registrant`, `reference_no`, `register_by`, `user_type`, `register_date`, `deleted_date`, `status`) VALUES (1, 'TA21001', 'savio no', 'MIRANDA', 'saviomanblue@gmail.com', '91', '0820828625', '2000-07-29', '21', 'female', '1', '6', '7', '403 524', 'sdfsdfdsfsdf', 'profile_pic/28072021144200at3.jpg', '', '', '', '', '', 'gdfdgfdg ok dfgdfgd', 'F21002', '4', 3, '2021-07-28 12:42:02', '2021-07-28 18:13:14', 0), (2, 'TA21002', 'ghhgfh ok', 'ghgfhgfh', 'gfhgfh@gmail.com', '91', '9089876756', '2000-07-14', '21', 'female', '1', '6', '10', '403 701', 'n nghgjjgjhj', 'profile_pic/29072021073437at3.jpg', '', '', '', '', '', 'gdfdgfdg dfgdfgd', 'F21002', '4', 3, '2021-07-29 05:34:38', '', 1), (3, 'TA21003', 'jjhghgghj', 'nbbjb', 'vgjfgfg@gmail.com', '91', '8978675609', '2000-07-15', '21', 'male', '1', '6', '12', '403 201', 'jhjhhjhjkhjkhkh', 'profile_pic/30072021071845at3.jpg', '', '', '', '', '', 'dsgfdsf sdfsdfsd', 'F21003', '4', 3, '2021-07-30 05:18:47', '2021-07-30 10:51:03', 0), (4, 'TA21004', 'gdgdfgdg', 'dgfg', 'gddg@gmail.com', '91', '0820828645', '2000-08-11', '20', 'male', '1', '6', '9', '403 503', 'vhhjvhvvhjv', 'profile_pic/02082021120826at3.jpg', '', '', '', '', '', 'dsgfdsf sdfsdfsd', 'F21003', '4', 3, '2021-08-02 10:08:28', '', 1), (5, 'TA21005', 'savio', 'MIRANDA', 'saviosmanblussse@gmail.com', '91', '0820886425', '1999-08-11', '21', 'male', '1', '6', '11', '403 808', 'fdgsdfsdfsdfsdfsf', 'profile_pic/02082021120918at3.jpg', '', '', '', '', '', 'dsgfdsf sdfsdfsd', 'F21003', '4', 3, '2021-08-02 10:09:31', '2021-08-03 15:34:18', 0); -- -------------------------------------------------------- -- -- Table structure for table `users_details` -- CREATE TABLE `users_details` ( `id` int(11) NOT NULL, `user_id` varchar(255) NOT NULL, `firstname` varchar(70) NOT NULL, `lastname` varchar(70) NOT NULL, `email` varchar(90) NOT NULL, `contact_no` varchar(15) NOT NULL, `date_of_birth` varchar(30) NOT NULL, `gender` varchar(10) NOT NULL, `address` text NOT NULL, `profile_pic` varchar(200) NOT NULL, `id_proof` varchar(200) NOT NULL, `user_type` int(11) NOT NULL, `registrant` varchar(70) NOT NULL, `register_by` varchar(11) NOT NULL COMMENT '1. admin 2.Travel Agent\r\n', `register_date` timestamp NOT NULL DEFAULT current_timestamp(), `deleted_date` varchar(30) NOT NULL, `status` int(11) NOT NULL DEFAULT 2 COMMENT ' 0-deleted 1-registered 2-pending' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `users_details` -- INSERT INTO `users_details` (`id`, `user_id`, `firstname`, `lastname`, `email`, `contact_no`, `date_of_birth`, `gender`, `address`, `profile_pic`, `id_proof`, `user_type`, `registrant`, `register_by`, `register_date`, `deleted_date`, `status`) VALUES (1, '1', 'Admin', 'Bizzmirth', 'bizzmirth.admin@gmail.com', '2377676909', '', 'male', 'xyz', '', '', 1, '', '1', '2021-05-27 13:43:28', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `user_type` -- CREATE TABLE `user_type` ( `id` int(11) NOT NULL, `name` varchar(70) NOT NULL, `status` int(11) NOT NULL DEFAULT 1 COMMENT '0-deleted 1-present' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `user_type` -- INSERT INTO `user_type` (`id`, `name`, `status`) VALUES (1, 'admin', 1), (2, 'Customer', 1), (3, 'Travel Agent', 1), (4, 'Franchisee', 1), (5, 'Sales Manager', 1), (6, 'Branch Manager', 1), (7, 'Regional Manager', 1); -- -- Indexes for dumped tables -- -- -- Indexes for table `branch_manager` -- ALTER TABLE `branch_manager` ADD PRIMARY KEY (`id`); -- -- Indexes for table `category` -- ALTER TABLE `category` ADD PRIMARY KEY (`id`); -- -- Indexes for table `cities` -- ALTER TABLE `cities` ADD PRIMARY KEY (`id`); -- -- Indexes for table `countries` -- ALTER TABLE `countries` ADD PRIMARY KEY (`id`); -- -- Indexes for table `customer` -- ALTER TABLE `customer` ADD PRIMARY KEY (`id`); -- -- Indexes for table `franchisee` -- ALTER TABLE `franchisee` ADD PRIMARY KEY (`id`); -- -- Indexes for table `login` -- ALTER TABLE `login` ADD PRIMARY KEY (`id`); -- -- Indexes for table `logs` -- ALTER TABLE `logs` ADD PRIMARY KEY (`id`); -- -- Indexes for table `regional_manager` -- ALTER TABLE `regional_manager` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sales_manager` -- ALTER TABLE `sales_manager` ADD PRIMARY KEY (`id`); -- -- Indexes for table `states` -- ALTER TABLE `states` ADD PRIMARY KEY (`id`); -- -- Indexes for table `subcategory` -- ALTER TABLE `subcategory` ADD PRIMARY KEY (`id`); -- -- Indexes for table `travel_agent` -- ALTER TABLE `travel_agent` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users_details` -- ALTER TABLE `users_details` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_type` -- ALTER TABLE `user_type` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `branch_manager` -- ALTER TABLE `branch_manager` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- AUTO_INCREMENT for table `category` -- ALTER TABLE `category` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `cities` -- ALTER TABLE `cities` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=90; -- -- AUTO_INCREMENT for table `countries` -- ALTER TABLE `countries` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `customer` -- ALTER TABLE `customer` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `franchisee` -- ALTER TABLE `franchisee` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `login` -- ALTER TABLE `login` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47; -- -- AUTO_INCREMENT for table `logs` -- ALTER TABLE `logs` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=130; -- -- AUTO_INCREMENT for table `regional_manager` -- ALTER TABLE `regional_manager` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `sales_manager` -- ALTER TABLE `sales_manager` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `states` -- ALTER TABLE `states` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29; -- -- AUTO_INCREMENT for table `subcategory` -- ALTER TABLE `subcategory` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `travel_agent` -- ALTER TABLE `travel_agent` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `users_details` -- ALTER TABLE `users_details` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `user_type` -- ALTER TABLE `user_type` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; COMMIT; /*!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 */;
/** * Collect data from BY_SHISETSU_IMAGE table * @author ThuanLM * @version $Id: ShisetsuImageService_getListImageShisetsu_Sel_01.sql 14751 2014-07-16 16:10:49Z p_re_mintoan $ */ SELECT SI.IMAGE_SLIDE_CATEGORY_KBN AS CATEGORY_KBN ,SI.IMAGE_TITLE AS TITLE ,SI.IMAGE_CAPTION AS CAPTION ,SI.IMAGE_FILE_NAME AS FILE_NAME ,SI.IMAGE_KYODAKU_KBN AS KYODAKU_KBN ,SI.IMAGE_KYODAKU_EPR_YMD AS KYODAKU_EPR_YMD ,SI.IMAGE_TYPE ,SI.IMAGE_NO FROM BY_SHISETSU_IMAGE SI WHERE SI.SHISETSU_CD = /*shisetsuCd*/'000002004' AND SI.DELETE_FLG <> '1'
CREATE TABLE `userrole` ( `userId` bigint(20) NOT NULL, `role` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, `id` bigint(20) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), KEY `key_userId` (`userId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
/* Copyright 2021 Snowplow Analytics Ltd. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -- Use variable to set scan limits DECLARE LOWER_LIMIT, UPPER_LIMIT TIMESTAMP; DECLARE SESSIONS_TO_PROCESS_QUERY STRING; {{if eq .model "mobile"}} -- Session context schema evolved with time. Finding all versions of column. DECLARE SESSION_ID, SESSION_CONTEXT_COLUMNS STRING; CALL {{.output_schema}}.mobile_session_context_fields(SESSION_ID, SESSION_CONTEXT_COLUMNS); {{end}} SET (LOWER_LIMIT, UPPER_LIMIT) = (SELECT AS STRUCT lower_limit, upper_limit FROM {{.scratch_schema}}.{{.model}}_base_new_events_limits{{.entropy}}); SET SESSIONS_TO_PROCESS_QUERY = format(""" -- Get sessionids for new events CREATE OR REPLACE TABLE {{.scratch_schema}}.{{.model}}_base_sessions_to_process{{.entropy}} AS( SELECT {{if eq .model "web"}} a.domain_sessionid {{else if eq .model "mobile"}} %s {{end}} AS session_id, MIN(a.collector_tstamp) AS min_tstamp, MAX(a.collector_tstamp) AS max_tstamp FROM {{.input_schema}}.events a LEFT JOIN {{.scratch_schema}}.{{.model}}_base_run_manifest{{.entropy}} b ON a.event_id = b.event_id WHERE b.event_id IS NULL AND a.collector_tstamp >= @lowerLimit AND a.collector_tstamp <= @upperLimit AND TIMESTAMP_DIFF(a.dvce_sent_tstamp, a.dvce_created_tstamp, DAY) <= {{or .days_late_allowed 3}} -- don't process data that's too late AND {{if eq .model "web"}} a.domain_sessionid {{else if eq .model "mobile"}} %s {{end}} IS NOT NULL -- Filter by platform. Required. AND a.platform IN ( {{range $i, $platform := .platform_filters}} {{if $i}}, {{end}} '{{$platform}}' -- User defined platforms if specified {{else}} {{if eq .model "web"}} 'web' {{else if eq .model "mobile"}} 'mob' {{end}} --default values {{end}} ) {{if .app_id_filters}} -- Filter by app_id. Ignore if not specified. AND a.app_id IN ( {{range $i, $app_id := .app_id_filters}} {{if $i}}, {{end}} '{{$app_id}}' {{end}} ) {{end}} {{if eq (or .derived_tstamp_partitioned false) true}} AND a.derived_tstamp >= @lowerLimit AND a.derived_tstamp <= @upperLimit {{end}} GROUP BY 1 );""" {{if eq .model "mobile"}} , SESSION_ID, SESSION_ID {{end}}); --Only sub strings if mobile model. EXECUTE IMMEDIATE SESSIONS_TO_PROCESS_QUERY USING LOWER_LIMIT AS lowerLimit, UPPER_LIMIT AS upperLimit;
-- impression funnel on the campaign SELECT COUNT(DISTINCT CASE WHEN d.valid = 1 AND noad = 0 THEN d.deliveryid END) AS delivery, COUNT(DISTINCT CASE WHEN i.valid = 1 AND i.impressiontype = 0 THEN d.deliveryid END) AS deliveredImp, COUNT(DISTINCT CASE WHEN i.valid = 1 AND i.impressiontype = 0 AND (capabilitiesmask & 4294967296) > 0 THEN d.deliveryid END) AS measurableImp_RL2, COUNT(DISTINCT CASE WHEN i.valid = 1 AND i.impressiontype = 1 THEN d.deliveryid END) AS viewableImp_RL2, COUNT(DISTINCT CASE WHEN i.valid= 1 AND noad = 0 AND i.isimpression = 1 THEN d.deliveryid END) AS monetizedImp_RL2 FROM public.rl2_delivery d INNER JOIN public.rl2_impression i ON (d.deliveryid=i.deliveryid) WHERE d.ad_adid in (38768) AND i.valid = 1 AND d.timestamp >= '2015-12-19 00:00:00' AND d.timestamp < '2016-01-01 00:00:00' ;
SELECT CONTRACT_NO, --契約番号 SUPPLIES_NO, --物件番号 PAY_TYPE , --支払種別 PAY_NO , --支払番号 PAY_SIGHT , --支払サイト PAY_SCHEDULED_DATE , --支払予定日 PAY_DATE , --支払日 REAL_PAY_DATE, --実支払日 -- ***【TFS STEP 1 向け仕様追加・変更対応】 sunjie add 2013/02/25 start *** -- PAY_TYPE_DETAIL --支払小分類 -- ***【TFS STEP 1 向け仕様追加・変更対応】 sunjie add 2013/02/25 end *** -- FROM PAY_INFO P WHERE CONTRACT_NO = /*contractNo*/ AND SUPPLIES_NO = /*supplyNo*/ AND PAY_TYPE = CAST(/*payType*/ AS CHAR(1)) ORDER BY PAY_NO ASC
UPDATE jobs SET update_message = $1, update_image = $2 WHERE job_id = $3 AND caregiver_id = $4 RETURNING *;
--- TODO update params here insert into sg_archives (author_id, post_media, title, main_url) values ($1, $2, $3, $4) returning *;
CREATE TABLE users ( uniqueId SERIAL PRIMARY KEY, name CHARACTER VARYING(30), address CHARACTER VARYING(30) );
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!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 */; CREATE DATABASE IF NOT EXISTS `zumbi` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `zumbi`; DROP TABLE IF EXISTS `access`; CREATE TABLE IF NOT EXISTS `access` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `REQUEST` varchar(200) NOT NULL, `METHOD` varchar(12) NOT NULL, `REMOTE` varchar(200) NOT NULL, `AGENT` varchar(300) NOT NULL, `ACCEPT` varchar(200) NOT NULL, `ENCODING` varchar(200) NOT NULL, `LANGUAGE` varchar(200) NOT NULL, `IDATE` datetime NOT NULL, PRIMARY KEY (`ID`), KEY `ID` (`ID`,`IDATE`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; DROP TABLE IF EXISTS `erp_usuarios`; CREATE TABLE IF NOT EXISTS `erp_usuarios` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `primeiro_nome` varchar(45) CHARACTER SET latin1 NOT NULL, `segundo_nome` varchar(45) CHARACTER SET latin1 NOT NULL, `email` varchar(100) CHARACTER SET latin1 NOT NULL, `senha` varchar(60) CHARACTER SET latin1 NOT NULL, `criado` datetime NOT NULL, `modificado` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ativo` bit(1) NOT NULL DEFAULT b'1', `status` varchar(20) CHARACTER SET latin1 NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `uniq_email` (`email`), KEY `key_email` (`email`) COMMENT ' ', KEY `key_senha` (`senha`), KEY `key_ativo` (`ativo`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; INSERT INTO `erp_usuarios` (`id`, `primeiro_nome`, `segundo_nome`, `email`, `senha`, `criado`, `modificado`, `ativo`, `status`) VALUES (1, 'Bill', 'Rocha', 'paulo.rocha@outlook.com', 'e807f1fcf82d132f9bb018ca6738a19f', '2015-10-10 00:00:00', '2015-10-10 20:10:39', b'1', 'ACTIVE'), (2, 'Willian', 'Rafael César', 'abul@gmail.com', 'e807f1fcf82d132f9bb018ca6738a19f', '2015-10-10 00:00:00', '2015-10-10 20:10:39', b'1', 'ACTIVE'), (3, 'Gerber', 'Zurox', 'zurox@outlook.com', 'e807f1fcf82d132f9bb018ca6738a19f', '2015-10-10 00:00:00', '2015-10-10 20:12:12', b'1', 'ACTIVE'), (4, 'Jefferson', 'dos Santos e Silva', 'jeff_ss@gmail.com', 'e807f1fcf82d132f9bb018ca6738a19f', '2015-10-10 00:00:00', '2015-10-10 20:12:12', b'1', 'ACTIVE'), (5, 'Marcos', 'Vinícios do Nascimento', 'vini-nascimento@ymail.com', 'e807f1fcf82d132f9bb018ca6738a19f', '2015-10-10 00:00:00', '2015-10-10 20:13:10', b'1', 'DISABLED'), (6, 'Marta', 'Barata da Silva', 'martachinela@gmail.com', 'e807f1fcf82d132f9bb018ca6738a19f', '0000-00-00 00:00:00', '2015-10-25 01:46:13', b'1', 'ACTIVE'), (7, 'Armando', 'Pinto de Souza', 'armandinho24@gmagazine.com.br', 'e807f1fcf82d132f9bb018ca6738a19f', '0000-00-00 00:00:00', '2015-10-25 01:46:13', b'1', 'ACTIVE'), (8, 'Marina', 'do Rego Salgado', 'maresal@yahoo.com.br', 'e807f1fcf82d132f9bb018ca6738a19f', '0000-00-00 00:00:00', '2015-10-25 01:46:13', b'1', 'ACTIVE'); DROP TABLE IF EXISTS `groups`; CREATE TABLE IF NOT EXISTS `groups` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `PAR` int(11) NOT NULL DEFAULT '0', `STATUS` tinyint(1) NOT NULL DEFAULT '1', `NAME` varchar(200) NOT NULL, `ABOUT` text NOT NULL, PRIMARY KEY (`ID`,`PAR`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Groups defines' AUTO_INCREMENT=19 ; INSERT INTO `groups` (`ID`, `PAR`, `STATUS`, `NAME`, `ABOUT`) VALUES (1, 0, 1, 'Gerências', 'Grupo de acesso geral as gerências'), (2, 0, 1, 'Marketing', 'Grupo base do setor de marketing'), (3, 1, 1, 'Financeiro', 'Departamento financeiro'), (4, 1, 1, 'Administrativo', 'Gerência administrativa'), (5, 1, 1, 'Novos Negócios', 'Gerência de Novos Negócios'), (6, 2, 1, 'Pesquisa', 'Departamento de Pesquisa de Mercado'), (7, 2, 1, 'Midias Digitais', 'Departamento de gerenciamento de midias digitais'), (8, 2, 1, 'Produtos', 'Departamento de Marketing a Produtos'), (9, 0, 1, 'TI', 'Tecnologia da Infomação'), (10, 9, 1, 'Hardware', 'Equipamentos de TI'), (11, 9, 1, 'Software', 'Departamento de Software'), (12, 10, 1, 'CPD', 'Central de processamento de dados'), (13, 10, 1, 'Rede', 'Rede de dados e conexões'), (14, 10, 1, 'Manutenção', 'Manetenção de equipamentos de TI'), (15, 11, 1, 'Desenvolvimento', 'Desenvolvimento de sistemas'), (16, 11, 1, 'Sistemas', 'Análise de sistemas'), (17, 11, 1, 'Segurança', 'Análise e desenvolvimento de segurança em TI'), (18, 11, 1, 'Database', 'Inteligência operacional de base de dados'); DROP TABLE IF EXISTS `messages`; CREATE TABLE IF NOT EXISTS `messages` ( `ID` double NOT NULL AUTO_INCREMENT, `SENDDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `IDFROM` int(11) NOT NULL, `NAMEFROM` varchar(200) NOT NULL, `TOGROUP` int(11) DEFAULT '0', `TOUSER` int(11) DEFAULT '0', `TYPE` enum('msg','img','file') NOT NULL DEFAULT 'msg' COMMENT 'types: msg/img/file', `CONTENT` text NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Messages data' AUTO_INCREMENT=261 ; INSERT INTO `messages` (`ID`, `SENDDATE`, `IDFROM`, `NAMEFROM`, `TOGROUP`, `TOUSER`, `TYPE`, `CONTENT`) VALUES (1, '2015-10-13 08:43:44', 1, 'Bill Rocha', 9, 0, 'msg', 'Teste de envio de mensagem para um GRUPO'), (2, '2015-10-13 08:43:50', 1, 'Bill Rocha', 0, 3, 'msg', 'Teste de envio de mensagem para um determinado USUÁRIO.'), (3, '2015-10-13 09:15:43', 1, 'Bill Rocha', 16, 0, 'msg', 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'), (4, '2015-10-13 09:01:22', 1, 'Bill Rocha', 16, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.'), (5, '2015-10-13 08:43:58', 1, 'Bill Rocha', 16, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (6, '2015-10-13 09:15:09', 1, 'Bill Rocha', 16, 0, 'msg', 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (7, '2015-10-13 08:44:04', 1, 'Bill Rocha', 15, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (8, '2015-10-13 08:44:06', 1, 'Bill Rocha', 15, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (9, '2015-10-17 17:55:03', 1, 'Bill Rocha', 15, 0, 'msg', 'teste'), (10, '2015-10-17 17:59:40', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'olá'), (11, '2015-10-17 18:00:03', 1, 'Bill Rocha', 15, 0, 'msg', 'ttfcdfggh'), (12, '2015-10-17 18:02:46', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'ola, de novo'), (13, '2015-10-17 18:02:56', 1, 'Bill Rocha', 15, 0, 'msg', 'hi'), (14, '2015-10-17 18:03:07', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'ok'), (15, '2015-10-17 18:04:04', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'ttt'), (16, '2015-10-17 18:05:01', 1, 'Bill Rocha', 15, 0, 'msg', 'ghg'), (17, '2015-10-17 18:05:14', 1, 'Bill Rocha', 15, 0, 'msg', 'hhh'), (18, '2015-10-17 18:05:27', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'hjjkkk'), (19, '2015-10-17 18:08:07', 1, 'Bill Rocha', 15, 0, 'msg', 'Estou no canal 15'), (20, '2015-10-17 18:08:28', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Estou no canal 1'), (21, '2015-10-17 18:08:35', 1, 'Bill Rocha', 15, 0, 'msg', 'ok'), (22, '2015-10-17 18:08:59', 1, 'Bill Rocha', 15, 0, 'msg', 'ok'), (23, '2015-10-17 18:09:11', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'como?'), (24, '2015-10-17 18:09:28', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'fala, ai'), (25, '2015-10-17 18:09:37', 1, 'Bill Rocha', 15, 0, 'msg', 'como assim?:'), (26, '2015-10-17 18:35:27', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'sadsad'), (27, '2015-10-17 18:39:20', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'teste'), (28, '2015-10-17 18:40:32', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'tese'), (29, '2015-10-17 18:41:47', 1, 'Bill Rocha', 1, 0, 'msg', 'olá'), (30, '2015-10-17 18:42:00', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'tudo bem?'), (31, '2015-10-17 18:42:10', 1, 'Bill Rocha', 1, 0, 'msg', 'ok'), (32, '2015-10-17 18:42:19', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'hi'), (33, '2015-10-17 18:42:27', 1, 'Bill Rocha', 1, 0, 'msg', 'ui'), (34, '2015-10-17 18:42:41', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'a\\cxxz\\cxz\\c\\xzc sadd aSDASdAS'), (35, '2015-10-17 18:44:03', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'olá'), (36, '2015-10-17 18:44:11', 1, 'Bill Rocha', 1, 0, 'msg', 'oi'), (37, '2015-10-17 18:44:22', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'hime aslkjd m ksnm'), (38, '2015-10-17 18:44:26', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (39, '2015-10-17 18:45:46', 1, 'Bill Rocha', 1, 0, 'msg', 'hello!'), (40, '2015-10-17 18:46:14', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'olá, galera!!'), (41, '2015-10-17 18:47:14', 1, 'Bill Rocha', 1, 0, 'msg', 'hi'), (42, '2015-10-17 18:47:22', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'ok'), (43, '2015-10-17 19:05:10', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'teste'), (44, '2015-10-17 19:10:08', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'sdfdsf'), (45, '2015-10-17 19:10:14', 1, 'Bill Rocha', 1, 0, 'msg', 'asdsa'), (46, '2015-10-17 19:35:19', 1, 'Bill Rocha', 1, 0, 'msg', 'fdgbfd'), (47, '2015-10-17 19:35:33', 1, 'Bill Rocha', 15, 0, 'msg', 'vcbcv'), (48, '2015-10-17 19:35:54', 1, 'Bill Rocha', 15, 0, 'msg', 'asdsad'), (49, '2015-10-17 19:36:30', 1, 'Bill Rocha', 15, 0, 'msg', 'dsfsd df'), (50, '2015-10-17 20:03:59', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (51, '2015-10-17 20:09:04', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (52, '2015-10-17 20:18:39', 1, 'Bill Rocha', 1, 0, 'msg', 'Outro teste'), (53, '2015-10-17 20:19:41', 2, 'Willian Rafael César', 1, 0, 'msg', 'Hello'), (54, '2015-10-17 20:26:00', 1, 'Bill Rocha', 1, 0, 'msg', 'olá'), (55, '2015-10-17 20:28:09', 1, 'Bill Rocha', 1, 0, 'msg', 'dsafdsa dsaf sadf sdaf~pdsj]fçlskda<br/>f'), (56, '2015-10-17 20:28:11', 1, 'Bill Rocha', 1, 0, 'msg', 'sdakf sda~fkjsdaflsdakflsdkjf~sdkf'), (57, '2015-10-17 20:28:13', 1, 'Bill Rocha', 1, 0, 'msg', 'dsfdslfknjsdfsdalkfsdaoifhsda'), (58, '2015-10-17 20:28:15', 1, 'Bill Rocha', 1, 0, 'msg', 'sdahssdidhs sad'), (59, '2015-10-17 20:33:39', 2, 'Willian Rafael César', 9, 0, 'msg', 'aasd saas dsad'), (60, '2015-10-17 20:33:40', 2, 'Willian Rafael César', 9, 0, 'msg', 'asd sa'), (61, '2015-10-17 20:33:41', 2, 'Willian Rafael César', 9, 0, 'msg', 'sad'), (62, '2015-10-17 20:33:41', 2, 'Willian Rafael César', 9, 0, 'msg', 'd sad sad'), (63, '2015-10-17 21:19:46', 1, 'Bill Rocha', 15, 0, 'msg', 'xzcxzcxzc'), (64, '2015-10-17 21:23:55', 1, 'Bill Rocha', 16, 0, 'msg', 'zxczxczx cxzc'), (65, '2015-10-21 23:01:55', 2, 'Willian Rafael César', 9, 0, 'msg', 'teste'), (66, '2015-10-21 23:02:01', 2, 'Willian Rafael César', 9, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (67, '2015-10-21 23:03:57', 1, 'Bill Rocha', 15, 0, 'msg', 'teste'), (68, '2015-10-21 23:06:20', 1, 'Bill Rocha', 15, 0, 'msg', 'teste'), (69, '2015-10-21 23:21:33', 1, 'Bill Rocha', 9, 0, 'msg', 'Teste'), (70, '2015-10-21 23:22:25', 1, 'Bill Rocha', 1, 0, 'msg', 'olá'), (71, '2015-10-21 23:35:46', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (72, '2015-10-21 23:45:58', 1, 'Bill Rocha', 1, 0, 'msg', 'Este é mais um teste de mensagem!'), (73, '2015-10-21 23:51:32', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (74, '2015-10-22 00:10:29', 1, 'Bill Rocha', NULL, 0, 'msg', 'Enviando mensagens de teste'), (75, '2015-10-22 00:10:53', 1, 'Bill Rocha', 1, 0, 'msg', 'Enviando algumas mensagens de teste ao servidor.'), (76, '2015-10-22 00:12:10', 1, 'Bill Rocha', NULL, 0, 'msg', 'teste'), (77, '2015-10-22 00:12:29', 1, 'Bill Rocha', 1, 0, 'msg', 'oqeu é isso'), (78, '2015-10-22 00:13:57', 2, 'Willian Rafael César', 1, 0, 'msg', 'olá, galera!!'), (79, '2015-10-22 00:15:48', 2, 'Willian Rafael César', 1, 0, 'msg', 'teste'), (80, '2015-10-22 00:16:02', 1, 'Bill Rocha', 1, 0, 'msg', 'Meu teste'), (81, '2015-10-22 00:16:10', 2, 'Willian Rafael César', 1, 0, 'msg', 'ok'), (82, '2015-10-22 00:19:59', 2, 'Willian Rafael César', 1, 0, 'msg', 'outra mensagem de teste'), (83, '2015-10-22 00:29:49', 2, 'Willian Rafael César', 1, 0, 'msg', 'teste'), (84, '2015-10-22 00:30:46', 2, 'Willian Rafael César', 1, 0, 'msg', 'olá!'), (85, '2015-10-22 00:32:05', 2, 'Willian Rafael César', 1, 0, 'msg', 'Olá, galera!'), (86, '2015-10-22 00:32:16', 1, 'Bill Rocha', 1, 0, 'msg', 'blaz'), (87, '2015-10-22 00:33:00', 2, 'Willian Rafael César', 1, 0, 'msg', 'hi, men.'), (88, '2015-10-22 00:33:05', 1, 'Bill Rocha', 1, 0, 'msg', 'olá'), (89, '2015-10-22 00:33:38', 2, 'Willian Rafael César', 1, 0, 'msg', 'ok'), (90, '2015-10-22 00:46:03', 2, 'Willian Rafael César', 1, 0, 'msg', 'ts'), (91, '2015-10-22 00:52:54', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (92, '2015-10-22 00:53:06', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (93, '2015-10-22 01:27:50', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (94, '2015-10-22 01:40:39', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (95, '2015-10-22 01:51:21', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (96, '2015-10-22 02:01:29', 1, 'Bill Rocha', 1, 0, 'msg', 'olá'), (97, '2015-10-22 02:01:54', 2, 'Willian Rafael César', 1, 0, 'msg', 'Olá, alguém por ai?'), (98, '2015-10-22 02:02:13', 2, 'Willian Rafael César', 1, 0, 'msg', 'oi'), (99, '2015-10-22 02:02:25', 1, 'Bill Rocha', 1, 0, 'msg', 'Come está, Rafael?'), (100, '2015-10-22 02:06:27', 2, 'Willian Rafael César', 1, 0, 'msg', 'ok'), (101, '2015-10-22 02:13:53', 1, 'Bill Rocha', 1, 0, 'msg', 'Teste'), (102, '2015-10-22 02:14:57', 3, 'Gerber Zurox', 9, 0, 'msg', 'E ai, gente?'), (103, '2015-10-22 02:22:02', 1, 'Bill Rocha', 1, 0, 'msg', 'Testando com um smartphone microsoft Lumia'), (104, '2015-10-22 02:43:59', 1, 'Bill Rocha', 15, 0, 'msg', 'olá'), (105, '2015-10-22 02:44:56', 2, 'Willian Rafael César', 9, 0, 'msg', 'Falái'), (106, '2015-10-22 02:46:23', 1, 'Bill Rocha', 9, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (107, '2015-10-22 02:46:44', 1, 'Bill Rocha', 9, 0, 'msg', '<b>olá</b>, pessoal!'), (108, '2015-10-22 02:49:22', 1, 'Bill Rocha', 15, 0, 'msg', 'Teste'), (109, '2015-10-22 02:50:50', 1, 'Bill Rocha', 15, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (110, '2015-10-22 03:00:30', 1, 'Bill Rocha', 15, 0, 'msg', 'teste'), (111, '2015-10-22 03:09:27', 1, 'Bill Rocha', 16, 0, 'msg', 'asdasd'), (112, '2015-10-22 03:21:25', 1, 'Bill Rocha', 16, 0, 'msg', 'fasdfsdfs'), (113, '2015-10-22 03:24:25', 1, 'Bill Rocha', 16, 0, 'msg', 'dfdfsfs'), (114, '2015-10-23 00:51:20', 1, 'Bill Rocha', 15, 0, 'msg', 'Teste'), (115, '2015-10-23 03:21:52', 1, 'Bill Rocha', 17, 0, 'msg', 'Hello!'), (116, '2015-10-23 03:23:23', 1, 'Bill Rocha', 17, 0, 'msg', 'Oi!'), (117, '2015-10-23 03:54:41', 1, 'Bill Rocha', 15, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (118, '2015-10-23 03:56:15', 1, 'Bill Rocha', 1, 0, 'msg', 'Olá!<br/>Alguém tem o controle do mês de Novembro - ativo?'), (119, '2015-10-24 02:59:08', 1, 'Bill Rocha', 1, 0, 'msg', 'oi'), (120, '2015-10-24 03:00:19', 1, 'Bill Rocha', 1, 0, 'msg', 'olá'), (121, '2015-10-24 03:00:55', 1, 'Bill Rocha', 1, 0, 'msg', 'hi!!'), (122, '2015-10-24 03:04:49', 1, 'Bill Rocha', 1, 0, 'msg', 'alguém por ai?'), (123, '2015-10-24 03:05:03', 2, 'Willian Rafael César', 1, 0, 'msg', 'ok'), (124, '2015-10-24 03:15:33', 1, 'Bill Rocha', 9, 0, 'msg', 'oi, mano!'), (125, '2015-10-24 03:16:16', 2, 'Willian Rafael César', 9, 0, 'msg', 'olá'), (126, '2015-10-24 03:18:12', 1, 'Bill Rocha', 9, 0, 'msg', 'hi'), (127, '2015-10-24 03:18:29', 2, 'Willian Rafael César', 9, 0, 'msg', 'olá'), (128, '2015-10-24 03:18:52', 1, 'Bill Rocha', 9, 0, 'msg', 'fala'), (129, '2015-10-24 03:19:04', 2, 'Willian Rafael César', 9, 0, 'msg', 'ok'), (130, '2015-10-24 03:21:24', 2, 'Willian Rafael César', 9, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (131, '2015-10-24 03:22:04', 1, 'Bill Rocha', 9, 0, 'msg', 'olá'), (132, '2015-10-24 03:22:09', 2, 'Willian Rafael César', 9, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (133, '2015-10-24 03:22:16', 1, 'Bill Rocha', 9, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (134, '2015-10-24 03:23:12', 2, 'Willian Rafael César', 9, 0, 'msg', 'this type'), (135, '2015-10-24 03:28:06', 2, 'Willian Rafael César', 9, 0, 'msg', 'yes'), (136, '2015-10-24 03:28:18', 1, 'Bill Rocha', 9, 0, 'msg', 'ok'), (137, '2015-10-24 03:28:25', 2, 'Willian Rafael César', 9, 0, 'msg', 'yes, ok!'), (138, '2015-10-24 03:42:06', 3, 'Gerber Zurox', 9, 0, 'msg', 'hi'), (139, '2015-10-25 01:32:06', 1, 'Bill Rocha', 16, 0, 'msg', 'hi'), (140, '2015-10-25 03:10:29', 8, 'Marina do Rego Salgado', 3, 0, 'msg', 'Olá, alguém interessado?'), (141, '2015-10-25 03:12:22', 7, 'Armando Pinto de Souza', 7, 0, 'msg', 'oieee'), (142, '2015-10-25 03:12:54', 6, 'Marta Barata da Silva', 3, 0, 'msg', 'hi, all'), (143, '2015-10-25 03:14:46', 5, 'Marcos Vinícios do Nascimento', 5, 0, 'msg', 'My god!? <br/><br/>It´s running!!'), (144, '2015-10-27 04:28:09', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore<br/> et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (145, '2015-10-27 04:28:34', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/><br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/><br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/><br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (146, '2015-10-27 04:30:42', 1, 'Bill Rocha', 17, 0, 'msg', 'oi, gente!'), (147, '2015-10-27 04:30:50', 1, 'Bill Rocha', 17, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (148, '2015-10-27 05:28:53', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'), (149, '2015-10-27 05:51:13', 3, 'Gerber Zurox', 9, 0, 'msg', 'Hello!'), (150, '2015-10-27 05:52:16', 2, 'Willian Rafael César', 1, 0, 'msg', 'Bem vindo!'), (151, '2015-10-27 05:52:39', 2, 'Willian Rafael César', 1, 0, 'msg', 'Valeu!<br/>Mas, por<br/>que ?'), (152, '2015-10-27 05:53:09', 1, 'Bill Rocha', 1, 0, 'msg', 'Porque sou o <b>dono</b> dessa sala!'), (153, '2015-10-27 05:54:36', 2, 'Willian Rafael César', 1, 0, 'msg', 'txs'), (154, '2015-10-27 05:54:45', 2, 'Willian Rafael César', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (155, '2015-10-27 05:55:20', 2, 'Willian Rafael César', 1, 0, 'msg', 'ok'), (156, '2015-10-27 05:56:25', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'olá'), (157, '2015-10-27 05:57:01', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'oi'), (158, '2015-10-27 05:57:22', 1, 'Bill Rocha', 1, 0, 'msg', 'hi, jeff'), (159, '2015-10-27 05:57:40', 2, 'Willian Rafael César', 1, 0, 'msg', 'hi, galkera'), (160, '2015-10-27 05:57:48', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (161, '2015-10-27 05:58:12', 2, 'Willian Rafael César', 1, 0, 'msg', 'yelow?!'), (162, '2015-10-27 05:58:26', 1, 'Bill Rocha', 1, 0, 'msg', 'como assim?'), (163, '2015-10-27 05:58:39', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'A cor de seu perfil!'), (164, '2015-10-27 05:58:51', 2, 'Willian Rafael César', 1, 0, 'msg', 'Não! Do seu, Jeff'), (165, '2015-10-27 06:00:27', 1, 'Bill Rocha', 1, 0, 'msg', 'hi'), (166, '2015-10-27 06:00:34', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'o que?'), (167, '2015-10-27 06:01:50', 1, 'Bill Rocha', 1, 0, 'msg', 'hello'), (168, '2015-10-27 06:02:14', 2, 'Willian Rafael César', 1, 0, 'msg', 'Voltei!'), (169, '2015-10-27 06:03:29', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'olá?'), (170, '2015-10-27 06:03:55', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'), (171, '2015-10-27 06:04:24', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (172, '2015-10-27 06:04:42', 2, 'Willian Rafael César', 1, 0, 'msg', 'Voltei'), (173, '2015-10-27 06:05:02', 2, 'Willian Rafael César', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'), (174, '2015-10-27 06:05:29', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Já caiu?'), (175, '2015-10-27 06:05:37', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Jeff'), (176, '2015-10-27 06:15:20', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (177, '2015-10-27 06:16:20', 1, 'Bill Rocha', 1, 0, 'msg', 'hello'), (178, '2015-10-27 06:16:33', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (179, '2015-10-27 06:17:14', 1, 'Bill Rocha', 1, 0, 'msg', 'olá'), (180, '2015-10-27 06:17:23', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (181, '2015-10-27 06:22:31', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (182, '2015-10-27 06:24:20', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (183, '2015-10-27 06:24:28', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (184, '2015-10-27 06:25:01', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (185, '2015-10-27 06:26:01', 1, 'Bill Rocha', 1, 0, 'msg', 'enviando'), (186, '2015-10-27 06:26:09', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (187, '2015-10-27 06:26:28', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (188, '2015-10-27 06:26:52', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (189, '2015-10-27 06:27:18', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (190, '2015-10-27 06:28:08', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (191, '2015-10-27 06:28:42', 1, 'Bill Rocha', 1, 0, 'msg', 'ho'), (192, '2015-10-27 06:28:53', 1, 'Bill Rocha', 1, 0, 'msg', 'hello, mans'), (193, '2015-10-27 06:29:01', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (194, '2015-10-27 06:32:28', 1, 'Bill Rocha', 17, 0, 'msg', 'olá'), (195, '2015-10-27 06:32:35', 1, 'Bill Rocha', 17, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (196, '2015-10-27 06:37:29', 2, 'Willian Rafael César', 9, 0, 'msg', 'hello, galera!'), (197, '2015-10-27 06:37:47', 2, 'Willian Rafael César', 9, 0, 'msg', 'oi?'), (198, '2015-10-28 19:15:35', 1, 'Bill Rocha', 1, 0, 'msg', 'hello'), (199, '2015-10-28 19:15:46', 2, 'Willian Rafael César', 1, 0, 'msg', 'e ai?'), (200, '2015-10-28 19:33:06', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Hi!'), (201, '2015-10-28 19:35:58', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Teste'), (202, '2015-10-28 19:36:02', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Ok'), (203, '2015-10-28 19:36:07', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', '?'), (204, '2015-10-28 19:40:32', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'), (205, '2015-10-28 20:01:58', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Teste'), (206, '2015-10-29 18:53:38', 1, 'Bill Rocha', 1, 0, 'msg', ']'), (207, '2015-10-29 19:55:14', 1, 'Bill Rocha', 1, 0, 'msg', 'Outro teste'), (208, '2015-10-29 19:55:35', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'), (209, '2015-11-05 20:42:46', 1, 'Bill Rocha', 1, 0, 'msg', 'teste'), (210, '2015-11-05 20:43:23', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (211, '2015-11-05 20:52:24', 1, 'Bill Rocha', 1, 0, 'msg', 'hello!!'), (212, '2015-11-05 20:53:23', 2, 'Willian Rafael César', 1, 0, 'msg', 'cvvsfd'), (213, '2015-11-05 20:53:29', 1, 'Bill Rocha', 1, 0, 'msg', 'olá!!'), (214, '2015-11-05 20:55:09', 1, 'Bill Rocha', 1, 0, 'msg', 'dsfsd'), (215, '2015-11-05 20:55:41', 2, 'Willian Rafael César', 1, 0, 'msg', 'sadasd'), (216, '2015-11-05 20:55:54', 2, 'Willian Rafael César', 1, 0, 'msg', 'Hi,men!'), (217, '2015-11-05 20:56:48', 2, 'Willian Rafael César', 1, 0, 'msg', 'dsfsdfsd'), (218, '2015-11-05 20:59:07', 2, 'Willian Rafael César', 1, 0, 'msg', 'Galera!!'), (219, '2015-11-05 20:59:25', 2, 'Willian Rafael César', 1, 0, 'msg', 'olá!!'), (220, '2015-11-05 21:00:35', 2, 'Willian Rafael César', 1, 0, 'msg', 'kill?'), (221, '2015-11-05 21:06:39', 2, 'Willian Rafael César', 1, 0, 'msg', 'Olá, IE!'), (222, '2015-11-05 21:12:20', 2, 'Willian Rafael César', 1, 0, 'msg', 'outro, IE?'), (223, '2015-11-05 21:25:04', 2, 'Willian Rafael César', 1, 0, 'msg', 'asdsa sad asdas dasd asdas asdsad'), (224, '2015-11-05 21:26:38', 2, 'Willian Rafael César', 1, 0, 'msg', 'hi'), (225, '2015-11-05 21:26:59', 2, 'Willian Rafael César', 1, 0, 'msg', 'Now, is bealtifull.'), (226, '2015-11-05 21:27:22', 2, 'Willian Rafael César', 1, 0, 'msg', 'It´s ok?'), (227, '2015-11-05 21:27:33', 1, 'Bill Rocha', 1, 0, 'msg', 'Yes, ok.'), (228, '2015-11-05 21:28:43', 4, 'Jefferson dos Santos e Silva', 1, 0, 'msg', 'Oi, galera!!'), (229, '2015-11-05 21:28:59', 1, 'Bill Rocha', 1, 0, 'msg', 'boa noite, Jeff'), (230, '2015-11-05 21:29:10', 2, 'Willian Rafael César', 1, 0, 'msg', 'Hi, Jeff'), (231, '2015-11-05 21:31:10', 1, 'Bill Rocha', 1, 0, 'msg', 'ol´s'), (232, '2015-11-05 21:31:16', 1, 'Bill Rocha', 1, 0, 'msg', 'ok'), (233, '2015-11-09 01:59:40', 2, 'Willian Rafael César', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (234, '2015-11-09 02:49:39', 1, 'Bill Rocha', 1, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (235, '2015-11-09 03:46:29', 1, 'Bill Rocha', 15, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (236, '2015-11-09 04:35:59', 2, 'Willian Rafael César', 9, 0, 'msg', 'Testando com mensagem encriptada em AES-192.'), (237, '2015-11-09 06:07:31', 2, 'Willian Rafael César', 9, 0, 'msg', 'Testando'), (238, '2015-11-09 06:08:07', 1, 'Bill Rocha', 9, 0, 'msg', 'hello!'), (239, '2015-11-09 06:08:43', 2, 'Willian Rafael César', 9, 0, 'msg', 'hi, mem'), (240, '2015-11-09 06:08:48', 2, 'Willian Rafael César', 9, 0, 'msg', 'ok'), (241, '2015-11-09 06:08:55', 1, 'Bill Rocha', 9, 0, 'msg', 'olá?!'), (242, '2015-11-09 06:09:29', 1, 'Bill Rocha', 9, 0, 'msg', 'ok?'), (243, '2015-11-09 06:10:00', 2, 'Willian Rafael César', 9, 0, 'msg', 'hi'), (244, '2015-11-09 07:21:54', 2, 'Willian Rafael César', 1, 0, 'msg', 'teste'), (245, '2015-11-09 07:35:16', 1, 'Bill Rocha', 9, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (246, '2015-11-09 07:35:32', 2, 'Willian Rafael César', 9, 0, 'msg', 'Teste'), (247, '2015-11-09 07:35:48', 1, 'Bill Rocha', 9, 0, 'msg', 'Hi, galera!!'), (248, '2015-11-09 07:35:59', 1, 'Bill Rocha', 9, 0, 'msg', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br/>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. <br/>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. <br/>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'), (249, '2015-11-09 07:36:58', 2, 'Willian Rafael César', 9, 0, 'msg', 'send messages encrypted with AES 256?!'), (250, '2015-11-09 07:37:12', 2, 'Willian Rafael César', 9, 0, 'msg', 'It´s ok?'), (251, '2015-11-09 07:37:20', 1, 'Bill Rocha', 1, 0, 'msg', 'yes.'), (252, '2015-11-09 07:37:25', 1, 'Bill Rocha', 1, 0, 'msg', 'ok'), (253, '2015-11-09 07:37:43', 1, 'Bill Rocha', 1, 0, 'msg', 'hello!'), (254, '2015-11-09 07:37:46', 2, 'Willian Rafael César', 9, 0, 'msg', 'ok'), (255, '2015-11-09 07:38:02', 2, 'Willian Rafael César', 9, 0, 'msg', 'ok'), (256, '2015-11-09 07:38:07', 1, 'Bill Rocha', 1, 0, 'msg', 'ok'), (257, '2015-11-09 07:38:18', 1, 'Bill Rocha', 1, 0, 'msg', 'hi'), (258, '2015-11-09 07:38:57', 1, 'Bill Rocha', 9, 0, 'msg', 'oi, galera'), (259, '2015-11-09 07:39:06', 2, 'Willian Rafael César', 9, 0, 'msg', 'blz??'), (260, '2015-11-09 07:39:23', 1, 'Bill Rocha', 9, 0, 'msg', 'tudo bem?'); DROP TABLE IF EXISTS `relay`; CREATE TABLE IF NOT EXISTS `relay` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `PID` int(11) NOT NULL, `STATUS` int(11) NOT NULL COMMENT '0 = stop, 1 = running, 2 = stoped', `SCRIPT` varchar(200) NOT NULL, `TITLE` varchar(200) NOT NULL, `IP` varchar(30) NOT NULL, `PORT` varchar(6) NOT NULL, `CHA_NOW` int(11) NOT NULL, `CHA_MAX` int(11) NOT NULL, `US_NOW` int(11) NOT NULL, `US_MAX` int(11) NOT NULL, `ERRORS` int(11) NOT NULL, `START` datetime NOT NULL, `LAST_UPDATE` datetime NOT NULL, PRIMARY KEY (`ID`,`TITLE`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='tabela de relays' AUTO_INCREMENT=32 ; DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `ID` int(11) NOT NULL COMMENT 'ID from erp_usuarios', `NAME` varchar(200) NOT NULL COMMENT 'erp_usuarios: nome + sobrenome', `SKEY` varchar(200) NOT NULL COMMENT 'assincronous key', `LAST` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'date of last sending msg ', UNIQUE KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `users` (`ID`, `NAME`, `SKEY`, `LAST`) VALUES (2, 'Willian Rafael César', 'RcGJ68O7-PWAXip>7{b4!NNgU/YQ(.=Fo+#%85lx', '2015-11-11 15:32:36'), (4, 'Jefferson dos Santos e Silva', 'X*/$I*JR@[%.ntUD$fcgXM/-=3C:v08yy6r3[z4D', '2015-11-05 21:31:31'); DROP TABLE IF EXISTS `user_group`; CREATE TABLE IF NOT EXISTS `user_group` ( `IDUSER` int(11) NOT NULL, `IDGROUP` int(11) NOT NULL, `LASTMSG` double NOT NULL, `LASTDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, UNIQUE KEY `USER` (`IDUSER`,`IDGROUP`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='User in groups'; INSERT INTO `user_group` (`IDUSER`, `IDGROUP`, `LASTMSG`, `LASTDATE`) VALUES (1, 1, 257, '2015-11-09 07:38:49'), (1, 4, 0, '2015-10-12 21:41:59'), (1, 9, 255, '2015-11-09 07:38:51'), (1, 10, 0, '2015-10-12 16:47:12'), (1, 11, 0, '2015-10-11 00:24:43'), (1, 13, 0, '2015-10-12 16:46:13'), (1, 14, 0, '2015-10-12 16:46:13'), (1, 15, 117, '2015-10-23 03:54:48'), (1, 16, 139, '2015-10-25 03:30:56'), (1, 17, 195, '2015-10-27 06:35:36'), (2, 1, 257, '2015-11-09 07:38:23'), (2, 3, 142, '2015-11-09 03:58:28'), (2, 9, 260, '2015-11-09 07:41:50'), (3, 9, 197, '2015-10-28 19:31:17'), (3, 10, 0, '2015-10-11 00:24:43'), (3, 12, 0, '2015-10-11 00:24:43'), (3, 18, 0, '2015-10-11 00:24:43'), (4, 1, 227, '2015-11-05 21:28:32'), (4, 2, 0, '2015-10-11 00:24:43'), (4, 6, 0, '2015-10-11 00:24:43'), (4, 7, 0, '2015-10-11 00:24:43'), (4, 8, 0, '2015-10-11 00:24:43'), (5, 1, 123, '2015-10-25 01:47:12'), (5, 5, 0, '2015-10-11 00:24:43'), (6, 3, 142, '2015-10-27 05:55:34'), (6, 7, 0, '2015-10-25 03:11:55'), (7, 3, 140, '2015-10-25 03:12:12'), (7, 7, 0, '2015-10-25 03:11:32'), (8, 3, 142, '2015-11-09 02:38:17'); DROP VIEW IF EXISTS `view_group_by_user`; CREATE TABLE IF NOT EXISTS `view_group_by_user` ( `ID` int(11) ,`LASTMSG` double ,`LASTDATE` timestamp ,`GID` int(10) unsigned ,`PAR` int(11) ,`NAME` varchar(200) ,`ABOUT` text ,`MSG` bigint(21) ,`TOTAL` bigint(21) ); DROP VIEW IF EXISTS `view_msg_from_users`; CREATE TABLE IF NOT EXISTS `view_msg_from_users` ( `ID` int(11) ,`NAME` varchar(200) ,`TYPE` enum('msg','img','file') ,`LAST` timestamp ,`TOTAL` bigint(21) ); DROP TABLE IF EXISTS `view_group_by_user`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_group_by_user` AS select `user_group`.`IDUSER` AS `ID`,`user_group`.`LASTMSG` AS `LASTMSG`,`user_group`.`LASTDATE` AS `LASTDATE`,`groups`.`ID` AS `GID`,`groups`.`PAR` AS `PAR`,`groups`.`NAME` AS `NAME`,`groups`.`ABOUT` AS `ABOUT`,(select count(`messages`.`ID`) from `messages` where ((`messages`.`TOGROUP` = `GID`) and (`messages`.`ID` > `user_group`.`LASTMSG`))) AS `MSG`,(select count(`messages`.`ID`) from `messages` where (`messages`.`TOGROUP` = `GID`)) AS `TOTAL` from ((`user_group` join `users`) join `groups`) where ((`users`.`ID` = `user_group`.`IDUSER`) and (`groups`.`ID` = `user_group`.`IDGROUP`)) order by `groups`.`PAR` desc; DROP TABLE IF EXISTS `view_msg_from_users`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_msg_from_users` AS select `messages`.`IDFROM` AS `ID`,`messages`.`NAMEFROM` AS `NAME`,`messages`.`TYPE` AS `TYPE`,max(`messages`.`SENDDATE`) AS `LAST`,count(`messages`.`ID`) AS `TOTAL` from `messages` where `messages`.`IDFROM` in (select `user_group`.`IDUSER` from `user_group`) group by `messages`.`IDFROM`,`messages`.`TYPE` order by `LAST` desc; /*!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 */;
/* Formatted on 17/06/2014 18:08:23 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCREI_APP_LISTA_PARERI_GEM ( COD_ABI, COD_NDG, DESC_CAUSA_INCAGLIO, DESC_PROVVEDIMENTI_PRESI, DESC_CAUSA_SOFFERENZA, DESC_PROVVEDIMENTI_ASSUNTI, DESC_PROVVEDIMENTI_LEGALI ) AS SELECT COD_ABI, COD_NDG, CASE WHEN COD_TIPO_PAR = 'F01' THEN DESC_PARERE ELSE NULL END AS DESC_CAUSA_INCAGLIO, CASE WHEN COD_TIPO_PAR = 'F02' THEN DESC_PARERE ELSE NULL END AS DESC_PROVVEDIMENTI_PRESI, CASE WHEN COD_TIPO_PAR = 'F01' THEN DESC_PARERE ELSE NULL END AS DESC_CAUSA_SOFFERENZA, -- DA RIVEDERE CASE WHEN COD_TIPO_PAR = 'A01' THEN DESC_PARERE ELSE NULL END AS DESC_PROVVEDIMENTI_ASSUNTI, -- DA RIVEDERE CASE WHEN COD_TIPO_PAR = 'A07' THEN DESC_PARERE ELSE NULL END AS DESC_PROVVEDIMENTI_LEGALI -- DA RIVEDERE FROM T_MCREI_APP_PARERI; GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE, ON COMMIT REFRESH, QUERY REWRITE, DEBUG, FLASHBACK, MERGE VIEW ON MCRE_OWN.V_MCREI_APP_LISTA_PARERI_GEM TO MCRE_USR;
SELECT * FROM exercise_goals WHERE id = $1 ORDER BY last_log DESC;
-------------------------------------------------------- -- File created - Saturday-December-16-2017 -------------------------------------------------------- -------------------------------------------------------- -- DDL for Package Body PKGUTIL -------------------------------------------------------- CREATE OR REPLACE EDITIONABLE PACKAGE BODY "QUAKE"."PKGUTIL" IS FUNCTION to_time(pdate IN DATE) RETURN VARCHAR2 IS BEGIN RETURN TO_CHAR(pdate, 'hh24:mi:ss'); END; FUNCTION to_time_f(pdate IN DATE) RETURN NUMBER IS vfraction NUMBER; BEGIN vfraction := TO_NUMBER(TO_CHAR(pdate, 'hh24')) / 24 + TO_NUMBER(TO_CHAR(pdate, 'mi')) / 1440 + TO_NUMBER(TO_CHAR(pdate, 'ss')) / 86400; RETURN ROUND(vfraction, 18); END; FUNCTION to_julian(pdate IN DATE) RETURN NUMBER IS vTimeFraction NUMBER; yr_a NUMBER; yr_b NUMBER; dy NUMBER; mth NUMBER; yr NUMBER; jd NUMBER; BEGIN yr := EXTRACT(YEAR FROM pdate); mth := EXTRACT(MONTH FROM pdate); dy := EXTRACT(DAY FROM pdate); yr_a := TRUNC(yr / 100); yr_b := 2 - yr_a + TRUNC(yr_a / 4); vTimeFraction := to_time_f(pdate); -- adjustment for leap years IF mth > 2 THEN jd := TRUNC(365.25 * (yr + 4716)) + TRUNC(30.6001 * (mth + 1)) + dy + yr_b - 1524.5 + vTimeFraction; ELSE IF mth IN (1, 2) THEN yr := yr - 1; mth := mth + 12; jd := TRUNC(365.25 * (yr + 4716)) + TRUNC(30.6001 * (mth + 1)) + dy + yr_b - 1524.5 + vTimeFraction; END IF; END IF; RETURN jd; END; FUNCTION degReduce(pNum IN NUMBER) RETURN NUMBER IS c NUMBER; deg NUMBER; BEGIN IF pNum < 0 THEN c := ABS(TRUNC(pNum / 360)) + 1; deg := pNum + (c * 360); ELSE c := ABS(TRUNC(pNum / 360)); deg := pNum - (c * 360); END IF; RETURN deg; END degReduce; FUNCTION deg2Rad(p_degree IN NUMBER) RETURN NUMBER IS rad NUMBER; BEGIN rad := p_degree * (pi / 180); RETURN rad; END deg2rad; FUNCTION rad2Deg(p_rad IN NUMBER) RETURN NUMBER IS deg NUMBER; BEGIN deg := p_rad * (180 / pi); RETURN deg; END; FUNCTION dec2dms(p_dec IN NUMBER) RETURN VARCHAR2 IS v_deg NUMBER; v_min NUMBER; v_sec NUMBER; v_symbol VARCHAR2(1 CHAR); v_dms VARCHAR2(50 CHAR); BEGIN v_deg := TRUNC(ABS(p_dec)); v_min := TRUNC((ABS(p_dec) - v_deg) * 60); v_sec := ROUND(60 / ((((ABS(p_dec) - v_deg) * 60) - v_min) * 100), 2); IF p_dec < 0 THEN v_symbol := '-'; ELSE v_symbol := NULL; END IF; v_dms := v_symbol || v_deg || ' ' || v_min || ' ' || v_sec; RETURN v_dms; END dec2dms; -- expected format is DDDdMMmSS.SSSs FUNCTION dms2dec(pDMS IN VARCHAR2) RETURN NUMBER IS vDeg NUMBER; vMin NUMBER; vSec NUMBER; BEGIN vDeg := TO_NUMBER(REPLACE(REGEXP_SUBSTR(pDMS, '\D[[:digit:]]{1,3}d'), 'd')); vMin := TO_NUMBER(REPLACE(REGEXP_SUBSTR(pDMS, '[[:digit:]]{1,2}m'), 'm')); vSec := TO_NUMBER(REPLACE(REGEXP_SUBSTR(pDMS, '(\d\d\D[[:digit:]]{1,6})s'), 's')); IF vDeg < 0 THEN vDeg := vDeg - (vMin / 60) - (vSec / 3600); ELSE vDeg := vDeg + (vMin / 60) + (vSec / 3600); END IF; RETURN vDeg; END dms2dec; BEGIN NULL; END; /
-- По таблице Orders найти количество заказов, cделанных каждым продавцом. -- Заказ для указанного продавца – это любая запись в таблице Orders, -- где в колонке EmployeeID задано значение для данного продавца. -- В результатах запроса надо возвращать колонку с именем продавца -- (Должно высвечиваться имя полученное конкатенацией LastName & FirstName. -- Эта строка LastName & FirstName должна быть получена отдельным запросом -- в колонке основного запроса. Также основной запрос должен использовать -- группировку по EmployeeID.) с названием колонки ‘Seller’ и колонку -- c количеством заказов возвращать с названием 'Amount'. -- Результаты запроса должны быть упорядочены по убыванию количества заказов SELECT ( SELECT LastName + ' ' + FirstName FROM Employees WHERE EmployeeID = O.EmployeeID ) AS Seller, COUNT(*) AS Amount FROM Orders AS O GROUP BY O.EmployeeID ORDER BY Amount DESC
SELECT 'JC Ketterer' SELECT 7*4 SELECT (7-4)*8 SELECT 'Saratoga Hospital''s SQL Training Class' SELECT 'Day 1 Of Training', 5*3
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 02, 2021 at 03:59 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 7.3.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `project_db` -- -- -------------------------------------------------------- -- -- Table structure for table `districts` -- CREATE TABLE `districts` ( `id` int(11) NOT NULL, `Name` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `districts` -- INSERT INTO `districts` (`id`, `Name`) VALUES (1, 'Thiruvananthapuram'), (2, 'Kollam'), (3, 'Pathanamthitta'), (4, 'Alappuzha'), (5, 'Kottayam'), (6, 'Idukki'), (7, 'Ernakulam'), (8, 'Thrissur'), (9, 'Palakkad'), (10, 'Malappuram'), (11, 'Kozhikode'), (12, 'Wayanad'), (13, 'Kannur'), (14, 'Kasargod'); -- -------------------------------------------------------- -- -- Table structure for table `institution` -- CREATE TABLE `institution` ( `Institution` varchar(100) NOT NULL, `district` varchar(100) NOT NULL, `localbodytype` varchar(100) NOT NULL, `localbodyname` varchar(100) NOT NULL, `address` text NOT NULL, `pin` int(6) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `institution` -- INSERT INTO `institution` (`Institution`, `district`, `localbodytype`, `localbodyname`, `address`, `pin`) VALUES ('lbs', 'trivandrum', 'corporation', 'trivandrum', 'poojapura', 695001), ('kll', 'sdsdsd', 'sdsdsd', 'sdsdsd', 'dgrtytrytryt', 55656), ('sdsdsd', 'volvo', 'Panchayath', 'sdsdsd', 'sdsd', 8899), ('hsgdsdgs', 'volvo', 'Panchayath', 'niramankara', 'sfsfs', 695523), ('nss', '', 'Panchayath', 'niramankara', 'dfdfdf', 54454), ('hhh', 'Select District', 'Panchayath', 'niramankara', 'sfsfs', 3344), ('hsgdsdgs', 'Select District', 'Panchayath', 'dsds', 'dsdsd', 2147483647), ('sdsdsd', 'Select District', 'Panchayath', 'sdsdsd', 'sdsd', 9000), ('nss', 'Select District', 'Panchayath', 'niramankara', 'dsdsdsd', 3434343), ('nss', 'Select District', 'Panchayath', 'sdsdsd', 'dfdfdf', 89999), ('hsgdsdgs', 'Select District', 'Panchayath', 'sdsdsd', 'sddsd', 88999), ('hsgdsdgs', 'Select District', 'Corporation', 'sdsdsd', 'jj', 23232), ('sdsdsd', 'Select District', 'Panchayath', 'niramankara', 'cvfgf', 0), ('tytyty', 'Kollam', 'Panchayath', 'sdsdsd', 'sfsfs', 343434), ('aaaaaaaaaaa', 'Kollam', 'Panchayath', 'kkkkkkkkkkkkk', '333333333', 0); COMMIT; /*!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 */;
use sakila; show tables; SELECT * FROM film WHERE title = 'Velvet Terminator'; SELECT film_id FROM film WHERE title = 'Velvet Terminator'; SELECT * FROM inventory WHERE film_id = 938; /*join*/ SELECT i.* FROM inventory i JOIN film f ON (i.film_id = f.film_id) WHERE f.title = 'Velvet Terminator'; /*subquery*/ select * from inventory where film_id in ( select film_id from film where title = 'Velvet Terminator' ); /* Which is more efficient? https://stackoverflow.com/questions/2577174/join-vs-sub-query */
CREATE TABLE services( "category" varchar NOT null, "service_name" varchar NOT NULL, "price" DECIMAL NOT NULL, "duration" varchar NOT NULL, "description" varchar NOT NULL, "individual_service_id" bigserial NOT NULL UNIQUE, PRIMARY KEY("individual_service_id") );
SELECT 'Telesh' student FROM DUAL;
CREATE TABLE Card ( id CHAR(20) NOT NULL, money DOUBLE DEFAULT 0.00, del INT DEFAULT 1, version INT DEFAULT 1, create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, modify_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id) ); DROP TABLE Card; CREATE TABLE Recharge ( id BIGINT AUTO_INCREMENT, money DOUBLE NOT NULL, card_id CHAR(20) NOT NULL , del INT DEFAULT 1, version INT DEFAULT 1, create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, modify_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id) ); DROP TABLE Recharge; CREATE TABLE Rate ( id BIGINT AUTO_INCREMENT, rate DOUBLE NOT NULL , member_id BIGINT NOT NULL , del INT DEFAULT 1, version INT DEFAULT 1, create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, modify_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id) ); DROP TABLE Rate; CREATE TABLE Member ( id BIGINT AUTO_INCREMENT, name VARCHAR(20) NOT NULL , content VARCHAR(20) NOT NULL , priority BIGINT NOT NULL , add_points BIGINT NOT NULL , sub_points BIGINT NOT NULL , del INT DEFAULT 1, version INT DEFAULT 1, create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, modify_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id) ); DROP TABLE Member;
drop table if exists acooper.phoenix_city_sampling_targets_04252017; create table acooper.phoenix_city_sampling_targets_04252017 as select *, age_bin||'-'||race_bin||'-'||sex_bin as strata from ( select distinct vanid , ntile(2) over (order by age) as age_bin , age , case when racename = 'African American' then 'B' when racename = 'Caucasian' then 'W' when racename = 'Hispanic' then 'H' else 'O' end as race_bin , case when sex = 'F' then 'F' else 'M' end as sex_bin , vote_count from ( select *, (case when general15 != '' then 1 else 0 end) + (case when general13 != '' then 1 else 0 end) as vote_count from phoenix_sample_04252017 ) a where vote_count > 0 ); -- Data for quotas select strata, count(distinct vanid) from acooper.phoenix_city_sampling_targets_04252017 where vote_count > 0 group by 1 order by 1; -- get age cuts select min(age), max(age), age_bin from acooper.phoenix_city_sampling_targets_04252017 group by 3; -- grab all unique phones, preference black hh member select vanid , firstname , lastname , phone , age_bin||'-'||race_bin||'-'||sex_bin as strata from ( select distinct vanid , firstname , lastname , coalesce(preferredphone::varchar, cellphone::varchar, homephone::varchar, workphone::varchar) as phone , case when age <= 61 then 1 else 2 end as age_bin , case when racename = 'African American' then 'B' when racename = 'Caucasian' then 'W' when racename = 'Hispanic' then 'H' else 'O' end as race_bin , case when sex = 'F' then 'F' else 'M' end as sex_bin , row_number() over (partition by phone order by case when racename = 'African American' then 10 else random() end desc) as deduped from phoenix_sample_04252017 ) where deduped = 1;
------------------------------------------------------------ --建立数据库task15_book ------------------------------------------------------------ DROP DATABASE IF EXISTS `task15_book`; CREATE DATABASE `task15_book` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `task15_book`; ------------------------------------------------------------ --图书信息表bookinfo ------------------------------------------------------------ DROP TABLE IF EXISTS `bookinfo`; CREATE TABLE `bookinfo` ( `id` int(11) NOT NULL auto_increment, --自动编号 `isbn` varchar(13) NOT NULL , --国际标准书号 `typeid` int(11) NOT NULL, --图书类型id `bookname` varchar(100) NOT NULL, --书名 `writer` varchar(30) NOT NULL, --作者 `translater` varchar(30) DEFAULT NULL, --译者 `publisher` varchar(50) NOT NULL, --出版社 `date` varchar(40) NOT NULL, --出版日期 `price` FLOAT NOT NULL, --价格 PRIMARY KEY (`id`) --主键 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT = '图书信息表'; ------------------------------------------------------------ --图书类别表booktype ------------------------------------------------------------ DROP TABLE IF EXISTS `booktype`; CREATE TABLE `booktype` ( `id` int(11) NOT NULL auto_increment, --自动编号 `typename` varchar(20) NOT NULL, --图书类型 PRIMARY KEY (`id`) --主键 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT = '图书类别表'; ------------------------------------------------------------ --证件类型表idcard ------------------------------------------------------------ DROP TABLE IF EXISTS `idcard`; CREATE TABLE `idcard` ( `id` int(11) NOT NULL auto_increment, --自动编号 `typename` varchar(20) NOT NULL, --证件类型 PRIMARY KEY (`id`) --主键 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT = '证件类型表'; ------------------------------------------------------------ --读者信息表readerinfo ------------------------------------------------------------ DROP TABLE IF EXISTS `readerinfo`; CREATE TABLE `readerinfo` ( `id` int(11) NOT NULL auto_increment, --自动编号 `name` varchar(30) NOT NULL, --姓名 `sex` varchar(2) NOT NULL, --性别 `age` int(11) NOT NULL, --年龄 `idcardtype` int(11) NOT NULL, --证件类型 `idcardno` varchar(30) NOT NULL, --证件号码 `date` varchar(40) NOT NULL, --办证日期 `maxnum` int(11) NOT NULL, --最大可借书量 `tel` varchar(15) NOT NULL, --电话号码 `keepmoney` FLOAT NOT NULL, --押金 `zy` varchar(50) NOT NULL, --职业 PRIMARY KEY (`id`) --主键 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT = '读者信息表'; ------------------------------------------------------------ --管理员信息表admin ------------------------------------------------------------ DROP TABLE IF EXISTS `admin`; CREATE TABLE `admin` ( `id` int(11) NOT NULL auto_increment, --自动编号 `username` varchar(30) NOT NULL, --用户名 `password` varchar(30) NOT NULL, --密码 `mail` varchar(30) NOT NULL, --邮箱 PRIMARY KEY (`id`) --主键 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT = '管理员信息表'; ------------------------------------------------------------ --管理员信息表admin插入一条记录 ------------------------------------------------------------ insert into admin values(1,'admin','admin','123@456.com'); ------------------------------------------------------------ --图书类别表booktype插入记录 ------------------------------------------------------------ insert into booktype values(1,'Web前端'); insert into booktype values(2,'编程语言'); insert into booktype values(3,'操作系统'); insert into booktype values(4,'手机开发'); ------------------------------------------------------------ --证件类型表idcard插入记录 ------------------------------------------------------------ insert into idcard values(1,'学生证'); insert into idcard values(2,'身份证'); ------------------------------------------------------------ --图书信息表bookinfo插入记录 ------------------------------------------------------------ insert into bookinfo values(1,'9787807423501',1,'HTML 5 简介','张三1','李四1','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(2,'9787807423502',1,'CSS3 简介','张三2','李四2','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(3,'9787807423503',1,'javascript 简介','张三3','李四3','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(4,'9787807423504',1,'jQuery 简介','张三4','李四4','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(5,'9787807423505',1,'Bootstrap 简介','张三5','李四5','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(6,'9787807423506',1,'jQuery UI 简介','张三6','李四6','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(7,'9787807423507',2,'Java 简介','张三7','李四7','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(8,'9787807423508',2,'C# 简介','张三8','李四8','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(9,'9787807423509',2,'PHP 简介','张三9','李四9','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(10,'9787807423510',3,'linux 简介','张三10','李四10','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(11,'9787807423511',3,'Windows操作系统','张三11','李四11','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(12,'9787807423512',4,'Android 简介','张三12','李四12','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(13,'9787807423513',4,'Android 系统架构','张三13','李四13','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(14,'9787807423514',4,'iOS 简介','张三14','李四14','旭日出版社','2010-08-1 09:43:22',35); insert into bookinfo values(15,'9787807423515',4,'Swift','张三15','李四15','旭日出版社','2010-08-1 09:43:22',35); ------------------------------------------------------------ --读者信息表readerinfo插入记录 ------------------------------------------------------------ insert into readerinfo values(1,'王五','男',20,1,'10086','2016-08-1 09:43:22',5,'13812345678',100,'学生'); insert into readerinfo values(2,'赵六','男',25,2,'10086123456789','2016-08-1 09:43:22',10,'13887654321',500,'工程师');
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Client : 127.0.0.1 -- Généré le : Mar 31 Mai 2016 à 12:29 -- Version du serveur : 5.7.9 -- Version de PHP : 5.6.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Base de données : `projet_java` -- -- -------------------------------------------------------- -- -- Structure de la table `message` -- DROP TABLE IF EXISTS `message`; CREATE TABLE IF NOT EXISTS `message` ( `idMessage` int(11) NOT NULL AUTO_INCREMENT, `timestampmessage` datetime DEFAULT NULL, `contenu` varchar(200) DEFAULT NULL, `auteur` varchar(25) DEFAULT NULL, `idUser` int(11) DEFAULT NULL, `idSalon` int(11) DEFAULT NULL, PRIMARY KEY (`idMessage`), KEY `FK_message_idUser` (`idUser`), KEY `FK_message_idSalon` (`idSalon`) ) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Structure de la table `salons` -- DROP TABLE IF EXISTS `salons`; CREATE TABLE IF NOT EXISTS `salons` ( `idSalon` int(11) NOT NULL AUTO_INCREMENT, `intitule` varchar(25) DEFAULT NULL, `couleur` varchar(9) DEFAULT 'white', `description` varchar(75) DEFAULT NULL, PRIMARY KEY (`idSalon`) ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Structure de la table `utilisateurs` -- DROP TABLE IF EXISTS `utilisateurs`; CREATE TABLE IF NOT EXISTS `utilisateurs` ( `idUser` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(25) DEFAULT NULL, `password` varchar(200) NOT NULL, `prenom` varchar(25) DEFAULT NULL, `nom` varchar(25) DEFAULT NULL, `typeprofil` varchar(25) DEFAULT NULL, `description` varchar(25) DEFAULT NULL, `estConnecte` tinyint(1) DEFAULT NULL, PRIMARY KEY (`idUser`), UNIQUE KEY `username` (`username`) ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Structure de la table `utiliser` -- DROP TABLE IF EXISTS `utiliser`; CREATE TABLE IF NOT EXISTS `utiliser` ( `idUser` int(11) NOT NULL, `idSalon` int(11) NOT NULL, `role` int(1) DEFAULT '0' COMMENT '0 = Spectateur, 1 = Rédacteur', PRIMARY KEY (`idUser`,`idSalon`), KEY `FK_utiliser_idSalon` (`idSalon`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Contraintes pour les tables exportées -- -- -- Contraintes pour la table `message` -- ALTER TABLE `message` ADD CONSTRAINT `FK_message_idSalon` FOREIGN KEY (`idSalon`) REFERENCES `salons` (`idSalon`), ADD CONSTRAINT `FK_message_idUser` FOREIGN KEY (`idUser`) REFERENCES `utilisateurs` (`idUser`); -- -- Contraintes pour la table `utiliser` -- ALTER TABLE `utiliser` ADD CONSTRAINT `FK_utiliser_idSalon` FOREIGN KEY (`idSalon`) REFERENCES `salons` (`idSalon`), ADD CONSTRAINT `FK_utiliser_idUser` FOREIGN KEY (`idUser`) REFERENCES `utilisateurs` (`idUser`); /*!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 */;
SELECT DISTINCT(account_manager) AS mgr_list FROM MODE.dunder_mifflin_paper_sales {%form%} acct_mgr: type: multiselect default: all options: labels: mgr_list values: mgr_list {%endform%}
INSERT INTO students (name, gender, is_muggle) VALUES ('Hermoine Granger', 'female', 'true');
--SET work_mem = '16MB'; CREATE INDEX idx_compra_data ON Compra (data); CREATE INDEX idx_cliente_vip ON Cliente (vip);
CREATE TABLE MONETARIO.TBMOEDA( ID INT NOT NULL PRIMARY KEY, NOME VARCHAR(50) NOT NULL, FATOR FLOAT NOT NULL )
CREATE DATABASE cv; DROP TABLE IF EXISTS Profile; Create TABLE Profile( ProfileId integer(10) AUTO_INCREMENT, name varchar(50), DateOfBirth date, PlaceOfBirth varchar(30), Adresse varchar(20), Phone double, E_mail varchar(30), GitHub_Profile varchar(30), Description varchar(100), CONSTRAINT PRIMARY KEY(ProfileId) ); DROP TABLE IF EXISTS skills; create TABLE skills( SkillsId integer, ProfileId integer(10), langues varchar(500), ITskills varchar(500), socialLife varchar(500), Hobbies varchar (200), PRIMARY KEY (SkillsId), CONSTRAINT FOREIGN KEY(ProfileId) REFERENCES Profile(ProfileId) ); DROP TABLE IF EXISTS Education; create TABLE Education( id integer, ProfileId integer(10), period varchar(50), description varchar(500), FOREIGN KEY(ProfileId) REFERENCES Profile(ProfileId), PRIMARY KEY (id) ); DROP TABLE IF EXISTS Experience; create TABLE Experience( ExperienceId integer, ProfileId integer(10), period varchar(15), titre varchar(50) , description varchar(200), tools varchar(200), PRIMARY KEY (ExperienceId), FOREIGN KEY(ProfileId) REFERENCES Profile(ProfileId) ); CREATE TABLE users( id integer AUTO_INCREMENT, email varchar(30), password varchar(30), PRIMARY KEY (id) ); CREATE TABLE Academic( ProfileId integer(10), graduation varchar(50), note float , PRIMARY KEY (ProfileId) ) ; DROP TABLE IF EXISTS Professional; CREATE TABLE Professional( certificat varchar (50), PRIMARY KEY(certificat) ) ; DROP TABLE IF EXISTS users; CREATE TABLE users( id integer AUTO_INCREMENT, email varchar(30), password varchar(30), PRIMARY KEY (id) );
-- APPLICATION SCHEMA DATA SCRIPT INSERT INTO "Setting" ("NAME" , "VALUE") VALUES ('EmpresaDefault', '0');
alter table REPORT_REPORT alter column REPORT_TYPE drop not null; alter table REPORT_TEMPLATE alter column TEMPLATE_FILE_ID drop not null;
DROP TABLE IF EXISTS `mip_page`; CREATE TABLE `mip_page` ( `id` char(24) CHARACTER SET latin1 NOT NULL, `url_name` varchar(255) DEFAULT NULL, `title` varchar(255) DEFAULT NULL, `keywords` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `content` longtext, `site_id` char(24) CHARACTER SET latin1 DEFAULT NULL, `sort` int(11) DEFAULT NULL, `template` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
select last_name from employees where last_name like ('J%') or last_name like ('K%') or last_name like ('L%') or last_name like ('M%');
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 20, 2020 at 11:47 PM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `phoneshop` -- -- -------------------------------------------------------- -- -- Table structure for table `cart` -- CREATE TABLE `cart` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `quantity` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `cart` -- INSERT INTO `cart` (`id`, `user_id`, `product_id`, `quantity`) VALUES (6, 9, 6, 1); -- -------------------------------------------------------- -- -- Table structure for table `category` -- CREATE TABLE `category` ( `id` int(11) NOT NULL, `name` varchar(100) NOT NULL, `cat_slug` varchar(150) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `category` -- INSERT INTO `category` (`id`, `name`, `cat_slug`) VALUES (1, 'Apple', 'laptops'), (2, 'Sumsung', 'desktop-pc'), (3, 'Other', 'tablets'), (4, 'Nokia', ''); -- -------------------------------------------------------- -- -- Table structure for table `details` -- CREATE TABLE `details` ( `id` int(11) NOT NULL, `sales_id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `quantity` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `details` -- INSERT INTO `details` (`id`, `sales_id`, `product_id`, `quantity`) VALUES (14, 9, 11, 2), (15, 9, 13, 5), (16, 9, 3, 2), (17, 9, 1, 3), (18, 10, 13, 3), (19, 10, 2, 4), (20, 10, 19, 5), (21, 1, 1, 1), (22, 2, 13, 1), (23, 4, 8, 1), (24, 5, 21, 1), (25, 6, 11, 2); -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `name` text NOT NULL, `description` text NOT NULL, `slug` varchar(200) NOT NULL, `price` double NOT NULL, `color` varchar(20) NOT NULL, `photo` varchar(200) NOT NULL, `date_view` date NOT NULL, `counter` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `products` -- INSERT INTO `products` (`id`, `category_id`, `name`, `description`, `slug`, `price`, `color`, `photo`, `date_view`, `counter`) VALUES (1, 1, 'APPLE IPHONE 7', '<p>Apple iPhone 7 smartphone. Announced Sep 2016.</p>\r\n\r\n<p>Features 4.7&Prime; LED-backlit IPS LCD display, Apple A10 Fusion chipset, 12 MP primary camera, 7 MP front camera, 1960 mAh battery, 256 GB storage, 2 GB RAM, IP67 certified, Ion-strengthened glass.</p>\r\n', 'apple-iphone-7', 103000, '', 'apple-iphone-7.jpg', '2020-04-19', 1), (2, 1, 'APPLE IPHONE 6S', '<p>Apple iPhone 6s smartphone. Announced Sep 2015.</p>\r\n\r\n<p>Features 4.7&Prime; LED-backlit IPS LCD display, Apple A9 chipset, 12 MP primary camera, 5 MP front camera, 1715 mAh battery, 128 GB storage, 2 GB RAM, Ion-strengthened glass.</p>\r\n', 'apple-iphone-6s', 64000, '', 'apple-iphone-6s.jpg', '2020-04-18', 18), (3, 1, ' iPhone XS', '<p>Apple iPhone x&nbsp;smartphone.&nbsp;</p>\r\n\r\n<p>Features 6.2&Prime; LED-backlit IPS LCD display, Apple A10 Fusion chipset, 16&nbsp;MP primary camera, 12&nbsp;MP front camera, 3600&nbsp;mAh battery, 256 GB storage, 3&nbsp;GB RAM, IP67 certified, Ion-strengthened glass.</p>\r\n', 'iphone-xs', 170500, '', 'iphone-xs.jpg', '0000-00-00', 0), (4, 1, 'iPhone 11', '<p>Apple iPhone 11&nbsp;smartphone.&nbsp;</p>\r\n\r\n<p>Features 6.4&Prime; LED-backlit IPS LCD display, Apple A10 Fusion chipset, 16&nbsp;MP primary camera, 12&nbsp;MP front camera, 3600&nbsp;mAh battery, 512&nbsp;GB storage, 3&nbsp;GB RAM, IP67 certified, Ion-strengthened glass.</p>\r\n', 'iphone-11', 139900, '', 'iphone-11.jpg', '0000-00-00', 0), (5, 4, 'Nokia 2.3', '<p>&nbsp;Dual Sim</p>\r\n\r\n<p>&nbsp;LTE 4G</p>\r\n\r\n<p>&nbsp;32 GB&nbsp;</p>\r\n\r\n<p>&nbsp;2GB RAM</p>\r\n', 'nokia-2-3', 17200, '', '', '0000-00-00', 0), (6, 4, 'nokia12', '', 'nokia12', 1200, '', '', '0000-00-00', 0), (7, 4, 'Nokia 216', '<p><em><strong>Nokia 216 phone</strong></em></p>\r\n\r\n<p><em><strong>&nbsp;Announced Sep 2016</strong></em></p>\r\n\r\n<p><em><strong>&nbsp;Features 2.4&Prime; display</strong></em></p>\r\n\r\n<p><em><strong>1020 mAh battery</strong></em></p>\r\n\r\n<p><em><strong>16 MB RAM.</strong></em></p>\r\n\r\n<p><em><strong>Lower Price Best Phone.</strong></em></p>\r\n', 'nokia-216', 5900, '', '', '0000-00-00', 0), (8, 4, 'Nokia 150', '<p>Dual sim.</p>\r\n\r\n<p>RAM 512mb</p>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>&nbsp;</p>\r\n', 'nokia-150', 5200, '', 'nokia-150.jpg', '2020-04-18', 2), (9, 4, 'Nokia 4.2', '<h3>RAM:&nbsp;3GB</h3>\r\n\r\n<h3>SIM:&nbsp;Dualsim</h3>\r\n\r\n<p>ROM: 3Gb&nbsp;</p>\r\n', 'nokia-4-2', 24500, '', 'nokia-4-2.jpg', '2020-04-19', 1), (10, 4, 'Nokia 1 plus', '<h3>RAM:&nbsp;1GB</h3>\r\n\r\n<h3>SIM:&nbsp;Dualsim</h3>\r\n\r\n<p>ROM: 8GB</p>\r\n', 'nokia-1-plus', 11500, '', 'nokia-1-plus.jpg', '0000-00-00', 0), (11, 4, 'Nokia 2.2', '<p>16 GB memory &amp; 2GB ram</p>\r\n\r\n<p>&nbsp;</p>\r\n', 'nokia-2-2', 11400, '', 'nokia-2-2.jpg', '2020-04-19', 1), (12, 2, 'Samsung Galaxy A50', '<h3>RAM:&nbsp;4GB</h3>\r\n\r\n<h3>SIM:&nbsp;Dualsim</h3>\r\n\r\n<p>ROM: 4GB</p>\r\n\r\n<p>&nbsp;</p>\r\n', 'samsung-galaxy-a50', 40500, '', 'samsung-galaxy-a50.jpg', '2020-04-19', 1), (13, 2, 'Sumsung galaxy j5', '<h3>RAM: 3GB</h3>\r\n\r\n<h3>SIM:&nbsp;Dualsim</h3>\r\n\r\n<p>ROM:32GB</p>\r\n', 'sumsung-galaxy-j5', 15000, '', 'sumsung-galaxy-j5.png', '2020-04-19', 1), (14, 2, 'Samsung Galaxy A30s', '<h3>RAM:&nbsp;4GB</h3>\r\n\r\n<h3>SIM:&nbsp;Dualsim</h3>\r\n\r\n<p>ROM:64GB</p>\r\n', 'samsung-galaxy-a30s', 37000, '', 'samsung-galaxy-a30s.jpg', '2020-04-18', 1), (15, 2, 'Samsung Galaxy s9', '<p>Samsung Galaxy &nbsp;s9</p>\r\n\r\n<p>RAM: 2GB</p>\r\n\r\n<p>ROM:16GB</p>\r\n', 'samsung-galaxy-s9', 17000, '', 'samsung-galaxy-s9.jpg', '0000-00-00', 0), (16, 2, 'Samsung Galaxy A80s', '<p>RAM: 8GB</p>\r\n\r\n<p>ROM: 8GB</p>\r\n\r\n<p>CAMERA IS TRIPLE FUNCTIONS&gt;</p>\r\n\r\n<p>&nbsp;</p>\r\n', 'samsung-galaxy-a80s', 95000, '', 'samsung-galaxy-a80s.jpg', '0000-00-00', 0), (17, 2, 'Samsung Galaxy A01', '<h3>RAM:&nbsp;2GB</h3>\r\n\r\n<h3>SIM:&nbsp;Dualsim</h3>\r\n\r\n<p>ROM: 2GB</p>\r\n', 'samsung-galaxy-a01', 18000, '', 'samsung-galaxy-a01.jpg', '0000-00-00', 0), (18, 2, 'Samsung Galaxy Note 10 PLUS', '<h3>RAM:&nbsp;12GB</h3>\r\n\r\n<h3>SIM:&nbsp;N/A</h3>\r\n\r\n<p>ROM: 128GB</p>\r\n', 'samsung-galaxy-note-10-plus', 120000, '', 'samsung-galaxy-note-10-plus.jpg', '0000-00-00', 0), (19, 2, 's', '<h3>RAM: 4GB</h3>\r\n\r\n<h3>SIM:&nbsp;N/A</h3>\r\n', 's', 12000, '', 's.jpg', '2020-04-20', 1), (20, 2, 'Samsung Galaxy C9pro', '<p>Samsung Galaxy C7 Pro</p>\r\n\r\n<p>Android smartphone.</p>\r\n\r\n<p>Announced Jan 2017.</p>\r\n\r\n<p>Features 5.7&Prime; Super AMOLED display</p>\r\n\r\n<p>, Snapdragon 626 chipset,</p>\r\n\r\n<p>16 MP primary camera,</p>\r\n\r\n<p>16 MP front camera,</p>\r\n\r\n<p>3300 mAh battery,</p>\r\n\r\n<p>64 GB storage,</p>\r\n\r\n<p>4 GB RAM</p>\r\n', 'samsung-galaxy-c9pro', 42000, '', 'samsung-galaxy-c9pro.jpg', '2020-04-20', 19), (21, 3, 'VIVO y15', '<h3>RAM:&nbsp;4GB</h3>\r\n\r\n<p>&nbsp;</p>\r\n', 'vivo-y15', 32800, '', 'vivo-y15.jpg', '2020-04-19', 14), (22, 3, ' Huawei Y7 Pro', '<p>The&nbsp;<strong>best price of Huawei Y7 Pro 2019 64GB ROM AND 3GB ROM&nbsp;</strong></p>\r\n\r\n<p><strong>in Sri Lanka</strong>&nbsp;is&nbsp;<strong>Rs. 22,850 sold at Smart Mobile&nbsp;</strong></p>\r\n\r\n<p>with 1 Year Hardware and Software Warranty</p>\r\n', 'huawei-y7-pro', 26850, '', 'huawei-y7-pro.jpg', '0000-00-00', 0), (23, 3, 'Huawei Y6 Pro', '<p>&nbsp;</p>\r\n\r\n<p>Huawei Huawei Y6 Pro 2019</p>\r\n\r\n<p><strong>&nbsp;32GB ROM </strong></p>\r\n\r\n<p><strong>3GB RAM</strong></p>\r\n\r\n<p>&nbsp;One Year <strong>Singer</strong> Warranty</p>\r\n', 'huawei-y6-pro', 21500, '', 'huawei-y6-pro.jpg', '0000-00-00', 0); -- -------------------------------------------------------- -- -- Table structure for table `sales` -- CREATE TABLE `sales` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `pay_id` varchar(50) NOT NULL, `sales_date` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sales` -- INSERT INTO `sales` (`id`, `user_id`, `pay_id`, `sales_date`) VALUES (1, 13, 'PAY', '2020-04-19'), (2, 13, '', '2020-04-19'), (3, 13, '', '2020-04-19'), (4, 14, '', '2020-04-19'), (5, 13, '', '2020-04-19'), (6, 14, '', '2020-04-19'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `email` varchar(200) NOT NULL, `password` varchar(60) NOT NULL, `type` int(1) NOT NULL, `firstname` varchar(50) NOT NULL, `lastname` varchar(50) NOT NULL, `address` text NOT NULL, `contact_info` varchar(100) NOT NULL, `photo` varchar(200) NOT NULL, `status` int(1) NOT NULL, `activate_code` varchar(15) NOT NULL, `reset_code` varchar(15) NOT NULL, `created_on` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `email`, `password`, `type`, `firstname`, `lastname`, `address`, `contact_info`, `photo`, `status`, `activate_code`, `reset_code`, `created_on`) VALUES (1, 'admin@fazal.com', '$2y$10$sk41jXU1y3yWOvavQfeL5uJv.WU4vOdLZ3t9AAvgHmz1rlhSEknZW', 1, 'fazal', 'admin', '', '', 'download.jpg', 1, '', '', '2020-04-14'), (9, 'faz@gmail.com', '$2y$10$Oongyx.Rv0Y/vbHGOxywl.qf18bXFiZOcEaI4ZpRRLzFNGKAhObSC', 0, 'faz', 'min', '24/5,mawanella.', '9475443747', 'male2.png', 1, 'k8FBpynQfqsv', 'wzPGkX5IODlTYHg', '2018-05-09'), (13, 'fazalm432@gmail.com', '$2y$10$/II98yWaqgemAtBJrzUyCOGEyQnGeYSEMzWVj84fAVcUAQRjk/Z6K', 0, 'faz', 'MHD', '24/3 samithiya road murthawela mawanella.', '0754453069', '', 1, '', 'YPsr3xpcADdygMj', '2020-04-15'), (14, 'faro1@gmail.com', '$2y$10$V2s.R2YJsEeew5iEYuhyLuKA4ojLKIsMIV1gQm9pMvOqNmNXvqS4y', 0, 'faro', 'sa', '', '', '', 0, '', '', '2020-04-18'); -- -- Indexes for dumped tables -- -- -- Indexes for table `cart` -- ALTER TABLE `cart` ADD PRIMARY KEY (`id`); -- -- Indexes for table `category` -- ALTER TABLE `category` ADD PRIMARY KEY (`id`); -- -- Indexes for table `details` -- ALTER TABLE `details` ADD PRIMARY KEY (`id`); -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sales` -- ALTER TABLE `sales` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `cart` -- ALTER TABLE `cart` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `category` -- ALTER TABLE `category` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `details` -- ALTER TABLE `details` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24; -- -- AUTO_INCREMENT for table `sales` -- ALTER TABLE `sales` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; COMMIT; /*!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 */;
drop database opus; create database opus; use opus;
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 18, 2018 at 05:13 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `baju_danus` -- -- -------------------------------------------------------- -- -- Table structure for table `jual` -- CREATE TABLE `jual` ( `id` int(10) UNSIGNED NOT NULL, `nama` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `jual` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `jual` -- INSERT INTO `jual` (`id`, `nama`, `jual`, `created_at`, `updated_at`) VALUES (1, 'sampah', '14559587.jpg', '2018-11-18 09:08:24', '2018-11-18 09:08:24'); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2018_01_12_133713_create_posts_table', 1), (4, '2018_11_08_013556_create_tabel_sampah', 1), (9, '2018_11_18_044438_create_juals_table', 2); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `posts` -- CREATE TABLE `posts` ( `id` int(10) UNSIGNED NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `body` text COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `posts` -- INSERT INTO `posts` (`id`, `title`, `body`, `created_at`, `updated_at`) VALUES (3, 'Kardus', 'Rp. 10.000', '2018-11-07 20:58:17', '2018-11-08 00:38:09'), (4, 'Plastik', 'Rp. 5.000', '2018-11-08 00:37:08', '2018-11-08 00:38:15'), (5, 'kaca', 'Rp. 10.000', '2018-11-14 20:56:17', '2018-11-14 20:56:28'); -- -------------------------------------------------------- -- -- Table structure for table `sampah` -- CREATE TABLE `sampah` ( `id` int(10) UNSIGNED NOT NULL, `jenis` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `berat` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `harga` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES (1, 'Fajar', 'fajarbayu90@gmail.com', NULL, '$2y$10$VH.55/z4Xc6J5qDpzA6wDOu.NHJhAg/qAmC9Mmhn.HyWgM3EPvngu', '3XUNPyifjGL1XRxTXgjw3BrwiesD6ilNHaoCcssu8808e67OgOE7BtjBXA6v', '2018-11-07 19:53:33', '2018-11-07 19:53:33'); -- -- Indexes for dumped tables -- -- -- Indexes for table `jual` -- ALTER TABLE `jual` ADD PRIMARY KEY (`id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `posts` -- ALTER TABLE `posts` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sampah` -- ALTER TABLE `sampah` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `jual` -- ALTER TABLE `jual` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `posts` -- ALTER TABLE `posts` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `sampah` -- ALTER TABLE `sampah` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; COMMIT; /*!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 */;
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 16, 2019 at 04:04 AM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `datasertifikasi` -- -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE `admin` ( `id_admin` int(2) NOT NULL, `nama_admin` varchar(30) NOT NULL, `username` varchar(25) NOT NULL, `password` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`id_admin`, `nama_admin`, `username`, `password`) VALUES (2, 'Dede Husen', 'ade', 'ade'), (11, 'ade', 'admin', 'admin'); -- -------------------------------------------------------- -- -- Table structure for table `datahalal` -- CREATE TABLE `datahalal` ( `no_sertifikat` varchar(17) NOT NULL, `jenis` varchar(30) NOT NULL, `nama_produk` varchar(30) NOT NULL, `nama_perusahaan` varchar(30) NOT NULL, `tgl_buat` date NOT NULL, `exp_date` date NOT NULL, `tgl_kadaluarsa` date NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `datahalal` -- INSERT INTO `datahalal` (`no_sertifikat`, `jenis`, `nama_produk`, `nama_perusahaan`, `tgl_buat`, `exp_date`, `tgl_kadaluarsa`) VALUES ('00100007301297', 'MAKANAN', 'Wafer Tanggo', 'PT ULTRA PRIMA ABADI', '2018-08-14', '2020-08-14', '2018-08-28'), ('00100014251200', 'MAKANAN', 'TRENZ Glazed Cracker', 'PT. INDOFOOD CBP SUKSES MAMKMU', '2018-08-14', '2020-08-14', '0000-00-00'), ('12121', 'MAKANAN', 'deded', 'dsfasfdsf', '2018-08-01', '2018-08-03', '2018-08-26'), ('469110002129', 'MINUMAN', 'ULTRA Sari Kacang Ijo', 'PT ULTRA JAYA ABADI', '2017-10-10', '2019-10-10', '0000-00-00'), ('7892122237', 'MAKANAN', '', '', '0000-00-00', '0000-00-00', '0000-00-00'); -- -- Indexes for dumped tables -- -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id_admin`); -- -- Indexes for table `datahalal` -- ALTER TABLE `datahalal` ADD PRIMARY KEY (`no_sertifikat`); /*!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 */;
CREATE TABLE cruises( id NUMBER, type_id NUMBER, name VARCHAR2(20), captain_id NUMBER NOT NULL, start_date DATE, end_date DATE, status VARCHAR2(5) DEFAULT 'DOCK', CONSTRAINT cruise_pk PRIMARY KEY ( id ) );
use [Dxc Training] --Create new table Client create table Client( Client_id int not null primary key identity(1,1), Client_Name varchar(64) not null, Contact_Person varchar(40), Agreement_Date date ) insert into Client values('Kumar','Varma','2020-10-24') select * from Client --Create new table named Project create table Project( Prj_ID int not null primary key identity(1,1), Prj_Name varchar(64) not null, Prj_Description varchar(1024), Prj_Start_Date date, Client_id int, foreign key(Client_id) references Client(Client_id)) --insert into Project values('Queen','It is a game','2020-12-1') --Create table Dept create table Dept( ID int not null primary key identity(1,1), DeptName varchar(32) not null) --CREATE TABLE EMPLOYEE create table Employee( EmpID varchar(8) not null primary key, EmpName varchar(64) not null, Email varchar(64) null, Phone varchar(815) not null, Dept int not null, foreign key(Dept) references Dept(ID)) insert into EMployee values(101,'Aish','aish1@gmail.com',9999999999,000) insert into Dept values('ECE') --adding new column alter table Project Add Prj_Cost decimal(12,2) null alter table Project alter column Prj_Description varchar(512)
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 17, 2018 at 03:00 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `diwaker` -- -- -------------------------------------------------------- -- -- Table structure for table `about_cl1_content` -- CREATE TABLE `about_cl1_content` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `para` varchar(1024) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `about_cl1_content` -- INSERT INTO `about_cl1_content` (`id`, `heading`, `para`, `date_time`, `status`) VALUES (1, 'Vision', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.', '', 1), (2, 'Mission', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.', '', 1), (3, 'Goal', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.', '', 1), (4, 'Eaque ipsa quae ab illo', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `about_cl1_heading` -- CREATE TABLE `about_cl1_heading` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `about_cl1_heading` -- INSERT INTO `about_cl1_heading` (`id`, `heading`, `date_time`, `status`) VALUES (1, 'Credentials', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `about_cl2_heading` -- CREATE TABLE `about_cl2_heading` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `image` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `about_cl2_heading` -- INSERT INTO `about_cl2_heading` (`id`, `heading`, `image`, `date_time`, `status`) VALUES (1, ' ', './theme/backend/uploads/images/column2image-1529785542.png', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `about_statistics` -- CREATE TABLE `about_statistics` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `para` varchar(255) NOT NULL, `image` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `about_statistics` -- INSERT INTO `about_statistics` (`id`, `heading`, `para`, `image`, `date_time`, `status`) VALUES (1, 'statistics', 'Meals Served', 'url(../images/banner-1.jpg) center fixed', '', 1), (2, '256', 'Meals Served', '', '', 1), (3, '256', 'Meals Served', '', '', 1), (4, '256', 'Meals Served', '', '', 1), (5, '256', 'Meals Served', '', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `address` -- CREATE TABLE `address` ( `id` int(11) NOT NULL, `address` varchar(255) NOT NULL, `mail` varchar(255) NOT NULL, `contact` varchar(50) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `address` -- INSERT INTO `address` (`id`, `address`, `mail`, `contact`, `date_time`, `status`) VALUES (1, 'Nehru Nagar Bhilai, Chhattisgarh (India) ', 'info@example.com', '9691078419', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE `admin` ( `id` int(11) NOT NULL, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `account_type` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`id`, `username`, `password`, `account_type`, `date_time`, `status`) VALUES (1, 'admin', '$2y$10$.DbHFv7dZob621aBCxtzqeriQS6WB41Pv8TRvkvYsV8lPH/qiHQmS', 'Admin', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `admin_side_nav` -- CREATE TABLE `admin_side_nav` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, `icon` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin_side_nav` -- INSERT INTO `admin_side_nav` (`id`, `name`, `url`, `icon`, `date_time`, `status`) VALUES (1, 'Dashboard', 'admin', 'fa fa-dashboard', '', 1), (2, 'Home', 'admin/home', 'fa fa-folder', '', 1), (3, 'About', 'admin/about', 'fa fa-laptop', '', 1), (4, 'Services', 'admin/services', 'fa fa-pie-chart', '', 1), (5, 'Gallery', 'admin/gallery', 'fa fa-table', '', 1), (6, 'Contact', 'admin/contact', 'fa fa-edit', '', 0), (7, 'Change Password', 'admin/change_password', 'fa fa-cog', '', 1), (8, 'Team', 'admin/team', 'fa fa-user', '', 1), (9, 'Subscribe', 'admin/subscribe', 'fa fa-envelope', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `banner_bottom` -- CREATE TABLE `banner_bottom` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `para` varchar(1024) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `banner_bottom` -- INSERT INTO `banner_bottom` (`id`, `heading`, `para`, `date_time`, `status`) VALUES (1, 'Client 1', 'Review 1', '', 1), (2, 'Client 2', 'Review 2', '', 1), (3, 'Client 3', 'Review 3', '', 1), (4, 'Client 4', 'Review 4', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `banner_quote` -- CREATE TABLE `banner_quote` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `para` varchar(1024) NOT NULL, `status` int(11) NOT NULL DEFAULT '1', `date_time` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `banner_quote` -- INSERT INTO `banner_quote` (`id`, `heading`, `para`, `status`, `date_time`) VALUES (1, 'Trending Plan 1', 'Description 1', 1, ''), (2, 'Trending Plan 2', 'Description 2', 1, ''), (3, 'Trending Plan 3', 'Description 3', 1, ''), (4, 'Trending Plan 4', 'Description 4', 1, ''), (5, 'Trending Plan 5', 'Description 5', 1, ''); -- -------------------------------------------------------- -- -- Table structure for table `company_email_id` -- CREATE TABLE `company_email_id` ( `id` int(11) NOT NULL, `name` varchar(250) NOT NULL, `email` varchar(50) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `company_email_id` -- INSERT INTO `company_email_id` (`id`, `name`, `email`, `date_time`, `status`) VALUES (1, 'Praveen', 'er.praveendewangan@gmail.com', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `footer` -- CREATE TABLE `footer` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `footer` -- INSERT INTO `footer` (`id`, `heading`, `date_time`, `status`) VALUES (1, '2018 ICE. All rights reserved', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `gallery` -- CREATE TABLE `gallery` ( `id` int(11) NOT NULL, `image` varchar(255) NOT NULL, `description` varchar(1024) NOT NULL, `title` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gallery` -- INSERT INTO `gallery` (`id`, `image`, `description`, `title`, `date_time`, `status`) VALUES (1, './theme/backend/uploads/images/galleryimage-1529786429.png', '1Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '1corporate', '', 1), (2, './theme/backend/uploads/images/galleryimage-1529678157.png', '2Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '2corporate', '', 1), (3, './theme/backend/uploads/images/galleryimage-1529678141.png', '3Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '3corporate', '', 1), (4, './theme/backend/uploads/images/galleryimage-1529678169.png', '4Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '4corporate', '', 1), (5, './theme/backend/uploads/images/galleryimage-1529678181.png', '5Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '5corporate', '', 1), (6, './theme/backend/uploads/images/galleryimage-1529678191.png', '6Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '6corporate', '', 1), (7, './theme/backend/uploads/images/galleryimage-1529678201.png', '7Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '7corporate', '', 1), (8, './theme/backend/uploads/images/galleryimage-1529678211.png', '8Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '8corporate', '', 1), (9, './theme/backend/uploads/images/galleryimage-1529786460.png', '9Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '9corporate', '', 1), (10, './theme/backend/uploads/images/galleryimage-1529678233.png', '10Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '10corporate', '', 1), (11, './theme/backend/uploads/images/galleryimage-1529678255.png', '11Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '11corporate', '', 1), (12, './theme/backend/uploads/images/galleryimage-1529678268.png', '12Nam libero tempore, cum soluta nobis est eligendi optio cumque.', '12corporate', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `get_in_touch` -- CREATE TABLE `get_in_touch` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, `icon` varchar(50) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `get_in_touch` -- INSERT INTO `get_in_touch` (`id`, `heading`, `url`, `icon`, `date_time`, `status`) VALUES (1, 'Follow us on social media', '', '', '', 1), (2, 'facebook', 'facebook1', '', '', 1), (3, 'twitter', 'twitter1', '', '', 1), (4, 'instagram', 'instagram1', '', '', 1), (5, 'pinterest', 'pinterest1', '', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `home_about1` -- CREATE TABLE `home_about1` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `image` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `home_about1` -- INSERT INTO `home_about1` (`id`, `heading`, `image`, `date_time`, `status`) VALUES (1, 'Our Commitments', 'banner-1.jpg', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `home_about2` -- CREATE TABLE `home_about2` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `para` varchar(1024) NOT NULL, `icon` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `home_about2` -- INSERT INTO `home_about2` (`id`, `heading`, `para`, `icon`, `date_time`, `status`) VALUES (1, 'Values', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.', 'glyphicon glyphicon-tree-deciduous', '', 1), (2, 'Mission', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.', 'glyphicon glyphicon glyphicon-user', '', 1), (3, 'Goal', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur', 'glyphicon glyphicon-home', '', 1), (4, 'Vision', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur', 'glyphicon glyphicon-eye-open', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `home_content` -- CREATE TABLE `home_content` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `sub_heading` varchar(255) NOT NULL, `para` varchar(1024) NOT NULL, `image` varchar(50) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `home_content` -- INSERT INTO `home_content` (`id`, `heading`, `sub_heading`, `para`, `image`, `date_time`, `status`) VALUES (1, 'Service 1', '1There are many variations', '1There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour.', '', '', 1), (2, 'Service 2', '2There are many variations', '2There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour.', '', '', 1), (3, 'Service 3', '3There are many variations', '3There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour.', '1.jpg', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `logo` -- CREATE TABLE `logo` ( `id` int(11) NOT NULL, `image` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `logo` -- INSERT INTO `logo` (`id`, `image`, `date_time`, `status`) VALUES (1, './theme/backend/uploads/images/logoimage-1529782605.png', 'demo.png', 1); -- -------------------------------------------------------- -- -- Table structure for table `map` -- CREATE TABLE `map` ( `id` int(11) NOT NULL, `map` varchar(1024) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `map` -- INSERT INTO `map` (`id`, `map`, `date_time`, `status`) VALUES (1, 'https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d26063.984716162606!2d144.9228869850419!3d-37.8295573872697!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6ad642af0f11fd81%3A0x5045675218ce7e0!2sMelbourne+VIC+3004%2C+Australia!5e1!3m2!1sen!2sin!4v1479988489554', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `menu` -- CREATE TABLE `menu` ( `id` int(11) NOT NULL, `menu_name` varchar(50) NOT NULL, `keyword` varchar(50) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `menu` -- INSERT INTO `menu` (`id`, `menu_name`, `keyword`, `date_time`, `status`) VALUES (1, 'home', 'Home', '', 1), (2, 'about', 'About', '', 1), (3, 'services', 'Services', '', 1), (4, 'gallery', 'Gallery', '', 1), (5, 'contact', 'Contact us', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `newsletter` -- CREATE TABLE `newsletter` ( `id` int(11) NOT NULL, `description` varchar(1024) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `newsletter` -- INSERT INTO `newsletter` (`id`, `description`, `date_time`, `status`) VALUES (1, 'Subscribe to our News letter', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `our_team` -- CREATE TABLE `our_team` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `description` varchar(1024) NOT NULL, `image` varchar(255) NOT NULL, `facebook` varchar(255) NOT NULL, `twitter` varchar(255) NOT NULL, `instagram` varchar(255) NOT NULL, `pinterest` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `our_team` -- INSERT INTO `our_team` (`id`, `heading`, `description`, `image`, `facebook`, `twitter`, `instagram`, `pinterest`, `date_time`, `status`) VALUES (1, 'OUR TEAM1', '', '', '', '', '', '', '', 1), (2, 'SMITHY', 'Lorem ipsum dolor sit amet, consectetur adipi est eligendi scing elit consectetur', './theme/backend/uploads/images/member1image-1529786747.png', 'fb1', 'tw1', 'ista1', 'pint1', '', 1), (3, '2SMITHY', '2Lorem ipsum dolor sit amet, consectetur adipi est eligendi scing elit consectetur', './theme/backend/uploads/images/member2image-1529786942.png', '2fb', '2tw', '2ista', '2pint', '', 1), (4, '3SMITHY', '3Lorem ipsum dolor sit amet, consectetur adipi est eligendi scing elit consectetur', './theme/backend/uploads/images/member3image-1529787150.png', '3fb', '3tw', '3ista', '3pint', '', 1), (5, '4SMITHY', '4Lorem ipsum dolor sit amet, consectetur adipi est eligendi scing elit consectetur', './theme/backend/uploads/images/member4image-1529787300.png', '4fb', '4tw', '4ista', '4pint', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `process_content` -- CREATE TABLE `process_content` ( `id` int(11) NOT NULL, `image` varchar(255) NOT NULL, `heading` varchar(255) NOT NULL, `para` varchar(1024) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `process_content` -- INSERT INTO `process_content` (`id`, `image`, `heading`, `para`, `date_time`, `status`) VALUES (1, './theme/backend/uploads/images/processimage-1529494503.png', 'Our Office', 'Follow simple steps to get associated with us', '', 1), (2, '', 'Our Office', 'Follow simple steps to get associated with us', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `services_content` -- CREATE TABLE `services_content` ( `id` int(11) NOT NULL, `heading` varchar(255) NOT NULL, `para` varchar(1024) NOT NULL, `image` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `services_content` -- INSERT INTO `services_content` (`id`, `heading`, `para`, `image`, `date_time`, `status`) VALUES (1, '1Ipsum', '1Lorem ipsum dolor sit amet eiusmod tempor .', './theme/backend/uploads/images/serviceimage-1529785894.png', '', 1), (2, '', '', './theme/backend/uploads/images/serviceimage-1529786040.png', '', 1), (3, '3Ipsum', '3Lorem ipsum dolor sit amet eiusmod tempor .', './theme/backend/uploads/images/serviceimage-1529786232.png', '', 1); -- -------------------------------------------------------- -- -- Table structure for table `subscribe` -- CREATE TABLE `subscribe` ( `id` int(11) NOT NULL, `email` varchar(255) NOT NULL, `date_time` varchar(50) NOT NULL, `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `subscribe` -- INSERT INTO `subscribe` (`id`, `email`, `date_time`, `status`) VALUES (1, 'meet4g@gmail.com', '', 1), (2, 'Email@gmail.com', '', 1); -- -- Indexes for dumped tables -- -- -- Indexes for table `about_cl1_content` -- ALTER TABLE `about_cl1_content` ADD PRIMARY KEY (`id`); -- -- Indexes for table `about_cl1_heading` -- ALTER TABLE `about_cl1_heading` ADD PRIMARY KEY (`id`); -- -- Indexes for table `about_cl2_heading` -- ALTER TABLE `about_cl2_heading` ADD PRIMARY KEY (`id`); -- -- Indexes for table `about_statistics` -- ALTER TABLE `about_statistics` ADD PRIMARY KEY (`id`); -- -- Indexes for table `address` -- ALTER TABLE `address` ADD PRIMARY KEY (`id`); -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id`); -- -- Indexes for table `admin_side_nav` -- ALTER TABLE `admin_side_nav` ADD PRIMARY KEY (`id`); -- -- Indexes for table `banner_bottom` -- ALTER TABLE `banner_bottom` ADD PRIMARY KEY (`id`); -- -- Indexes for table `banner_quote` -- ALTER TABLE `banner_quote` ADD PRIMARY KEY (`id`); -- -- Indexes for table `company_email_id` -- ALTER TABLE `company_email_id` ADD PRIMARY KEY (`id`); -- -- Indexes for table `footer` -- ALTER TABLE `footer` ADD PRIMARY KEY (`id`); -- -- Indexes for table `gallery` -- ALTER TABLE `gallery` ADD PRIMARY KEY (`id`); -- -- Indexes for table `get_in_touch` -- ALTER TABLE `get_in_touch` ADD PRIMARY KEY (`id`); -- -- Indexes for table `home_about1` -- ALTER TABLE `home_about1` ADD PRIMARY KEY (`id`); -- -- Indexes for table `home_about2` -- ALTER TABLE `home_about2` ADD PRIMARY KEY (`id`); -- -- Indexes for table `home_content` -- ALTER TABLE `home_content` ADD PRIMARY KEY (`id`); -- -- Indexes for table `logo` -- ALTER TABLE `logo` ADD PRIMARY KEY (`id`); -- -- Indexes for table `map` -- ALTER TABLE `map` ADD PRIMARY KEY (`id`); -- -- Indexes for table `menu` -- ALTER TABLE `menu` ADD PRIMARY KEY (`id`); -- -- Indexes for table `newsletter` -- ALTER TABLE `newsletter` ADD PRIMARY KEY (`id`); -- -- Indexes for table `our_team` -- ALTER TABLE `our_team` ADD PRIMARY KEY (`id`); -- -- Indexes for table `process_content` -- ALTER TABLE `process_content` ADD PRIMARY KEY (`id`); -- -- Indexes for table `services_content` -- ALTER TABLE `services_content` ADD PRIMARY KEY (`id`); -- -- Indexes for table `subscribe` -- ALTER TABLE `subscribe` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `about_cl1_content` -- ALTER TABLE `about_cl1_content` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `about_cl1_heading` -- ALTER TABLE `about_cl1_heading` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `about_cl2_heading` -- ALTER TABLE `about_cl2_heading` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `about_statistics` -- ALTER TABLE `about_statistics` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `address` -- ALTER TABLE `address` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `admin_side_nav` -- ALTER TABLE `admin_side_nav` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; -- -- AUTO_INCREMENT for table `banner_bottom` -- ALTER TABLE `banner_bottom` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `banner_quote` -- ALTER TABLE `banner_quote` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `company_email_id` -- ALTER TABLE `company_email_id` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `footer` -- ALTER TABLE `footer` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `gallery` -- ALTER TABLE `gallery` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; -- -- AUTO_INCREMENT for table `get_in_touch` -- ALTER TABLE `get_in_touch` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `home_about1` -- ALTER TABLE `home_about1` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `home_about2` -- ALTER TABLE `home_about2` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `home_content` -- ALTER TABLE `home_content` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `logo` -- ALTER TABLE `logo` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `map` -- ALTER TABLE `map` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `menu` -- ALTER TABLE `menu` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `newsletter` -- ALTER TABLE `newsletter` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `our_team` -- ALTER TABLE `our_team` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `process_content` -- ALTER TABLE `process_content` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `services_content` -- ALTER TABLE `services_content` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `subscribe` -- ALTER TABLE `subscribe` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; COMMIT; /*!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 */;
FROM ( select * from uxoe.xhaayi where pt = '${bizdate}' ) x INSERT overwrite TABLE uxoe.ialeulxx PARTITION(pt= ${bizdate-1} ) select case when length(iweet_d) > 2 then iweet_d else NULL end iweet_d , case when length(user_nick) > 2 then user_nick else NULL end user_nick , olx , uoex , brand , cpu , umsis , iakxh , resolution , os , os_version , client_ip , count(*) as count , max(from_unixtime(cast(server_time as bigint)/1000)) last_time , min(from_unixtime(cast(server_time as bigint)/1000)) first_time group by iweet_d, user_nick, olx, uoex, brand, cpu, umsis, iakxh, resolution, os, os_version, client_ip INSERT overwrite TABLE uxoe . adl_wdm_ip_device_sdt PARTITION ( pt = '${bizdate}' , seg = 'd1' ) select client_ip , olx , uoex , brand , cpu , umsis , iakxh , reserve2 utdid , min(from_unixtime(cast(server_time as bigint) / 1000)) first_time , max(from_unixtime(cast(server_time as bigint) / 1000)) last_time , count(*) , count(distinct pt) group by client_ip, olx, uoex, brand, cpu, umsis, iakxh, reserve2 INSERT overwrite TABLE uxoe . hxeh PARTITION ( pt = '${bizdate}' ) select unique_id() as uuid , regexp_extract(args, 'ongitude=(.*?)(,)') longitude , regexp_extract(args, 'latitude=(.*?)(,)') latitude , client_ip , protocol_version , olx , uoex , brand , cpu , umsis , iakxh , resolution , carrier , access , access_subtype , channel , app_key , app_version , user_nick , phone_number , country , language , os , os_version , sdk_type , sdk_version , reserve1 , reserve2 , reserve3 , reserve4 , reserve5 , reserves , local_time , from_unixtime(cast (server_time as bigint)/1000) server_time , page , event_id , arg1 , arg2 , arg3 , args , day , hour_id , iweet_d , oqlx , cast (regexp_extract(args , 'wifi_num=(.*?)(,)') as bigint) wifi_num WHERE length (args) > 5 AND instr(args , 'gsm_') > 0 ---------------------------
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 12, 2020 at 03:50 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `emp` -- -- -------------------------------------------------------- -- -- Table structure for table `master_emp` -- CREATE TABLE `master_emp` ( `me_id` int(11) NOT NULL, `me_fname` varchar(100) NOT NULL, `me_lname` varchar(100) NOT NULL, `me_email` varchar(100) DEFAULT NULL, `me_mobile` varchar(12) NOT NULL, `me_salary` float NOT NULL, `me_company` varchar(100) DEFAULT NULL, `me_dept_id` varchar(100) NOT NULL, `me_country` varchar(100) NOT NULL, `me_state` varchar(100) NOT NULL, `me_city` varchar(100) NOT NULL, `me_gender` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `master_emp` -- INSERT INTO `master_emp` (`me_id`, `me_fname`, `me_lname`, `me_email`, `me_mobile`, `me_salary`, `me_company`, `me_dept_id`, `me_country`, `me_state`, `me_city`, `me_gender`) VALUES (1, 'Pragyesh', 'Thakkar', 'pragyesht@gmail.com', '8889277770', 55000, 'PSPS', 'IT', 'India', 'State 3', 'City 3', 'Male'), (2, 'Yogesh', 'Rathore', 'norepy@gmail.com', '0987654321', 85000, 'Wipro', 'Finance', 'Australia', 'State 2', 'City 1', 'Male'); -- -- Indexes for dumped tables -- -- -- Indexes for table `master_emp` -- ALTER TABLE `master_emp` ADD PRIMARY KEY (`me_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `master_emp` -- ALTER TABLE `master_emp` MODIFY `me_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; COMMIT; /*!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 */;
select * from offices; SELECT TABLE_NAME FROM USER_TABLES; SELECT CITY, TARGET, SALES FROM OFFICES; SELECT CITY, TARGET, SALES FROM OFFICES WHERE REGION = 'Запад' / SELECT CITY, TARGET, SALES FROM OFFICES WHERE REGION = 'Запад' AND SALES > TARGET ORDER BY CITY; SELECT city, target, sales FROM offices; select avg(target), avg(sales) from offices where region = 'Запад'; SELECT NAME, REP_OFFICE, HIRE_DATE FROM SALESREPS; SELECT NAME, QUOTA, SALES FROM SALESREPS WHERE EMPL_NUM = 107; SELECT AVG(SALES) FROM SALESREPS WHERE EMPL_NUM = 107; SELECT NAME, HIRE_DATE FROM SALESREPS WHERE SALES > 50000; SELECT NAME, MANAGER, QUOTA FROM SALESREPS; SELECT city, region, sales FROM offices; SELECT CITY, REGION, (SALES-TARGET) FROM OFFICES; SELECT CITY, REGION, '$ '||(SALES-TARGET) AS STOIM FROM OFFICES; SELECT MFR_ID, PRODUCT_ID, DESCRIPTION, (QTY_ON_HAND* PRICE) FROM products; -- COL STOIM FORMAT A12 SELECT MFR_ID, PRODUCT_ID, DESCRIPTION, '$ '||(QTY_ON_HAND * PRICE) AS STOIM FROM PRODUCTS; SELECT NAME, QUOTA, (QUOTA +((SALES/100)*3)) FROM salesreps; SELECT CITY, 'Has sales OF', SALES FROM offices; SELECT MGR FROM OFFICES; SELECT DISTINCT MGR FROM OFFICES; SELECT CITY, SALES, TARGET FROM OFFICES WHERE SALES > TARGET; SELECT SALES, NAME, QUOTA FROM SALESREPS WHERE EMPL_NUM = 105; SELECT NAME, SALES FROM SALESREPS WHERE MANAGER = 104; SELECT NAME FROM SALESREPS WHERE HIRE_DATE < TO_DATE('01.06.1988','DD/MM/YYYY'); SELECT CITY, MGR FROM OFFICES WHERE MGR <> 108; SELECT city, sales, target FROM offices WHERE sales < (0.8 * target); SELECT ORDER_NUM, ORDER_DATE, MFR, PRODUCT, AMOUNT FROM ORDERS WHERE order_date BETWEEN TO_DATE('01.11.1989','DD/MM/YYYY') and TO_DATE('31.12.1989','DD/MM/YYYY'); SELECT ORDER_NUM, AMOUNT FROM ORDERS WHERE AMOUNT BETWEEN 20.000 AND 29.999; SELECT NAME, SALES, QUOTA FROM SALESREPS WHERE SALES NOT BETWEEN (0.8 * QUOTA) AND (1.2 * QUOTA); SELECT NAME, QUOTA, SALES FROM SALESREPS WHERE REP_OFFICE IN (11, 13, 22); SELECT ORDER_NUM, ORDER_DATE, AMOUNT FROM ORDERS WHERE order_date IN (TO_DATE('14.06.1990','DD/MM/YYYY'), TO_DATE('08.06.1990','DD/MM/YYYY'), TO_DATE('29.06.1990','DD/MM/YYYY'), TO_DATE('04.06.1990','DD/MM/YYYY')); SELECT ORDER_NUM, REP, AMOUNT FROM ORDERS WHERE REP IN (107, 109, 101, 103); SELECT COMPANY, CREDIT_LIMIT FROM CUSTOMERS WHERE COMPANY = 'Апельсин'; SELECT COMPANY, CREDIT_LIMIT FROM CUSTOMERS WHERE COMPANY LIKE '%н'; SELECT COMPANY, CREDIT_LIMIT FROM CUSTOMERS WHERE COMPANY LIKE '%бесы'; SELECT COMPANY, CREDIT_LIMIT FROM CUSTOMERS WHERE COMPANY LIKE 'Ап_льсин'; SELECT NAME FROM SALESREPS WHERE REP_OFFICE IS NULL; SELECT NM FROM COLORIS WHERE HAIR IS NULL; SELECT NAME FROM SALESREPS WHERE REP_OFFICE IS NOT NULL; SELECT NAME, QUOTA, SALES FROM SALESREPS WHERE SALES < QUOTA OR SALES < 300.0; SELECT NAME, QUOTA, SALES FROM SALESREPS WHERE SALES < QUOTA AND SALES < 300; SELECT NAME, QUOTA, SALES FROM SALESREPS WHERE (SALES < QUOTA) AND ( SALES > 150.000); SELECT NAME FROM SALESREPS WHERE (REP_OFFICE IN (22,11,12)) OR (MANAGER IS NULL AND HIRE_DATE >= TO_DATE('01.05.88','DD/MM/YYYY')) OR (SALES > QUOTA AND NOT SALES > 60.0); SELECT CITY, REGION, SALES FROM OFFICES ORDER BY REGION, CITY; SELECT CITY, REGION, SALES FROM OFFICES ORDER BY SALES DESC; SELECT CITY, REGION, (SALES - TARGET) FROM OFFICES ORDER BY 1 DESC; SELECT CITY, REGION, (SALES - TARGET) FROM OFFICES ORDER BY REGION ASC, 3 DESC; SELECT MFR_ID, PRODUCT_ID FROM PRODUCTS WHERE PRICE > 500.00 UNION SELECT DISTINCT MFR, PRODUCT FROM ORDERS WHERE AMOUNT > 4.00; SELECT MFR_ID, PRODUCT_ID FROM PRODUCTS WHERE PRICE > 500.00 UNION ALL SELECT DISTINCT MFR, PRODUCT FROM ORDERS WHERE AMOUNT > 4.00; SELECT MFR_ID, PRODUCT_ID FROM PRODUCTS WHERE PRICE > 500.00 UNION ALL SELECT DISTINCT MFR, PRODUCT FROM ORDERS WHERE AMOUNT > 4.00 ORDER BY 1,2;
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 28-10-2019 a las 21:47:28 -- Versión del servidor: 5.7.26 -- Versión de PHP: 7.3.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Base de datos: `appcountancy` -- -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `cuadre_diario` -- DROP TABLE IF EXISTS `cuadre_diario`; CREATE TABLE IF NOT EXISTS `cuadre_diario` ( `id_cuadre` int(11) NOT NULL AUTO_INCREMENT, `fecha_cuadre` date NOT NULL, `valor_transferencias` float NOT NULL, `valor_datafono` float NOT NULL, `valor_traslado_admin` float NOT NULL, `valor_recibido_domicilios` float NOT NULL, `valor_pago_domiciliario` float NOT NULL, `valor_ventas_efectivo` float NOT NULL, `valor_gastos_dia` float NOT NULL, PRIMARY KEY (`id_cuadre`), UNIQUE KEY `fecha_cuadre` (`fecha_cuadre`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `domicilio` -- DROP TABLE IF EXISTS `domicilio`; CREATE TABLE IF NOT EXISTS `domicilio` ( `id_domicilio` int(11) NOT NULL AUTO_INCREMENT, `fecha_domicilio` date NOT NULL, `nro_factura` int(11) NOT NULL, `valor_factura` float NOT NULL, `id_zona` int(11) NOT NULL, `id_mensajero` int(11) NOT NULL, `id_forma_pago` int(11) NOT NULL, `fecha_entrega_dinero` date DEFAULT NULL, `observaciones` varchar(150) DEFAULT NULL, PRIMARY KEY (`id_domicilio`), UNIQUE KEY `nro_factura` (`nro_factura`), KEY `id_zona` (`id_zona`), KEY `id_forma_pago` (`id_forma_pago`), KEY `domicilio_ibfk_1` (`id_mensajero`) ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `domicilio` -- INSERT INTO `domicilio` (`id_domicilio`, `fecha_domicilio`, `nro_factura`, `valor_factura`, `id_zona`, `id_mensajero`, `id_forma_pago`, `fecha_entrega_dinero`, `observaciones`) VALUES (1, '2019-10-20', 4454, 455700, 2, 1, 2, NULL, NULL), (4, '2019-10-23', 655, 563700, 2, 1, 1, NULL, ''), (6, '2019-10-23', 4467, 89000, 1, 2, 2, NULL, ''), (7, '2019-10-23', 4468, 745050, 2, 3, 1, NULL, ''), (8, '2019-10-23', 4469, 93400, 1, 2, 2, NULL, ''), (12, '2019-10-23', 656, 700000, 1, 2, 2, '2019-10-24', ''), (15, '2019-10-23', 700, 45600, 1, 2, 1, NULL, ''), (17, '2019-10-28', 777, 5600, 1, 3, 1, NULL, ''); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `egreso` -- DROP TABLE IF EXISTS `egreso`; CREATE TABLE IF NOT EXISTS `egreso` ( `id_gasto` int(11) NOT NULL AUTO_INCREMENT, `fecha_gasto` date NOT NULL, `concepto_gasto` varchar(100) NOT NULL, `valor_gasto` float NOT NULL, `observacion_gasto` varchar(200) NOT NULL, PRIMARY KEY (`id_gasto`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `egreso` -- INSERT INTO `egreso` (`id_gasto`, `fecha_gasto`, `concepto_gasto`, `valor_gasto`, `observacion_gasto`) VALUES (1, '2019-10-18', 'ASEO', 9750, 'Se compra una paquete de detergente y una escoba.'), (2, '2019-10-18', 'ASEO', 9750, 'Se compra una paquete de detergente y una escoba.'), (3, '2019-10-18', 'ALMUERZOS', 45600, 'Se compra una Frispicada'), (4, '2019-10-18', 'PAPELERÍA', 21400, 'Se compran rollos para la impresora térmica.'), (5, '2019-10-18', 'PAGO FACTURA ATENEA', 1204700, 'Se paga factura de mercancía nueva'), (6, '2019-10-19', 'PAPELERÍA', 8900, ''), (7, '2019-10-21', 'ALMUERZOS', 43000, 'Pollo KFC'), (8, '2019-10-21', 'PAPELERÍA', 21400, 'Se compran cintas transparentes'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `empresa` -- DROP TABLE IF EXISTS `empresa`; CREATE TABLE IF NOT EXISTS `empresa` ( `id_empresa` int(11) NOT NULL AUTO_INCREMENT, `nro_identificacion` varchar(15) NOT NULL COMMENT 'Cédula o NIT', `razon_social` varchar(100) NOT NULL COMMENT 'Nombre de la empresa', `direccion` varchar(100) NOT NULL, `telefono_uno` varchar(15) NOT NULL, `telefono_dos` varchar(15) DEFAULT NULL, `email_uno` varchar(100) NOT NULL, `email_dos` varchar(100) DEFAULT NULL, `activo` varchar(1) NOT NULL DEFAULT 'S' COMMENT 'Activo o inactivo', PRIMARY KEY (`id_empresa`), UNIQUE KEY `nro_identificacion` (`nro_identificacion`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `empresa` -- INSERT INTO `empresa` (`id_empresa`, `nro_identificacion`, `razon_social`, `direccion`, `telefono_uno`, `telefono_dos`, `email_uno`, `email_dos`, `activo`) VALUES (1, '1039467736', 'GIRLY', 'CL 73 SUR N 45 A 35', '3114904967', NULL, 'girli.sabaneta@gmail.com', NULL, 'S'), (2, '1152197333', 'SELENE', 'CR 52 47 01 LC 01 05', '3617496', NULL, 'cata_1289@hotmail.com', NULL, 'S'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `forma_pago` -- DROP TABLE IF EXISTS `forma_pago`; CREATE TABLE IF NOT EXISTS `forma_pago` ( `id_forma_pago` int(11) NOT NULL AUTO_INCREMENT, `nombre_pago` varchar(50) NOT NULL, PRIMARY KEY (`id_forma_pago`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `forma_pago` -- INSERT INTO `forma_pago` (`id_forma_pago`, `nombre_pago`) VALUES (1, 'EFECTIVO'), (2, 'TRANSFERENCIA'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `mensajero` -- DROP TABLE IF EXISTS `mensajero`; CREATE TABLE IF NOT EXISTS `mensajero` ( `id_mensajero` int(11) NOT NULL AUTO_INCREMENT, `id_tercero` int(11) NOT NULL, PRIMARY KEY (`id_mensajero`), KEY `mensajero_ibfk_1` (`id_tercero`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `mensajero` -- INSERT INTO `mensajero` (`id_mensajero`, `id_tercero`) VALUES (1, 3), (3, 4), (2, 5); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `rol` -- DROP TABLE IF EXISTS `rol`; CREATE TABLE IF NOT EXISTS `rol` ( `id_rol` int(11) NOT NULL AUTO_INCREMENT, `nombre` varchar(20) NOT NULL, `descripcion` varchar(250) NOT NULL, PRIMARY KEY (`id_rol`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `rol` -- INSERT INTO `rol` (`id_rol`, `nombre`, `descripcion`) VALUES (1, 'ADMIN', 'Este rol permite hacer las tareas de un administrador.'), (2, 'CAJERX', 'Este rol permite registrar pero no borrar ni actualizar.'), (3, 'AUXILIAR', 'Este usuario permite generar reportes.'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `tercero` -- DROP TABLE IF EXISTS `tercero`; CREATE TABLE IF NOT EXISTS `tercero` ( `id_tercero` int(11) NOT NULL AUTO_INCREMENT, `nro_identificacion` varchar(15) NOT NULL COMMENT 'Cédula de ciudadanía', `primer_nombre` varchar(30) NOT NULL, `segundo_nombre` varchar(30) DEFAULT NULL, `primer_apellido` varchar(30) NOT NULL, `segundo_apellido` varchar(30) DEFAULT NULL, `telefono_uno` varchar(15) NOT NULL, `telefono_dos` varchar(15) DEFAULT NULL, `email` varchar(100) NOT NULL, `activo` varchar(1) NOT NULL COMMENT 'Si es activo o inactivo', PRIMARY KEY (`id_tercero`), UNIQUE KEY `nro_identificacion` (`nro_identificacion`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `tercero` -- INSERT INTO `tercero` (`id_tercero`, `nro_identificacion`, `primer_nombre`, `segundo_nombre`, `primer_apellido`, `segundo_apellido`, `telefono_uno`, `telefono_dos`, `email`, `activo`) VALUES (1, '1026154301', 'JOHAN', 'ALEXANDER', 'LONDOÑO', 'BEDOYA', '3195893669', NULL, 'johannlondonob@gmail.com', 's'), (2, '1020293212', 'MARIA', 'ALEJANDRA', 'GUZMÁN', 'GARCÍA', '4480987', NULL, 'malejagarcia@gmail.com', 'S'), (3, '1027153404', 'MARLON', 'ALEXIS', 'LONDOÑO', 'BEDOYA', '3189458810', NULL, 'marlon1099@hotmail.com', 'S'), (4, '1026156001', 'JUAN', 'CAMILO', 'BEDOYA', NULL, '3006550', NULL, 'anfe0595@gmail.com', 'S'), (5, '74829134', 'ESTEBAN', NULL, 'JARAMILLO', NULL, '3102948820', NULL, 'juanes@hotmail.com', 'S'); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuario` -- DROP TABLE IF EXISTS `usuario`; CREATE TABLE IF NOT EXISTS `usuario` ( `id_usuario` int(11) NOT NULL AUTO_INCREMENT, `id_tercero` int(11) NOT NULL, `login_usuario` varchar(10) NOT NULL, `clave_usuario` varchar(15) NOT NULL, `id_rol` int(11) NOT NULL, PRIMARY KEY (`id_usuario`), UNIQUE KEY `id_tercero_2` (`id_tercero`), UNIQUE KEY `login_usuario` (`login_usuario`), KEY `id_tercero` (`id_tercero`), KEY `id_rol` (`id_rol`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `usuario` -- INSERT INTO `usuario` (`id_usuario`, `id_tercero`, `login_usuario`, `clave_usuario`, `id_rol`) VALUES (1, 1, 'JOHANL', '199520', 1), (5, 2, 'MALEJITA', 'MALEJITA', 3); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `usuario_empresa` -- DROP TABLE IF EXISTS `usuario_empresa`; CREATE TABLE IF NOT EXISTS `usuario_empresa` ( `id_usuario_empresa` int(11) NOT NULL AUTO_INCREMENT, `id_usuario` int(11) NOT NULL, `id_empresa` int(11) NOT NULL, PRIMARY KEY (`id_usuario_empresa`), KEY `id_empresa` (`id_empresa`), KEY `id_usuario` (`id_usuario`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `usuario_empresa` -- INSERT INTO `usuario_empresa` (`id_usuario_empresa`, `id_usuario`, `id_empresa`) VALUES (1, 1, 1); -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `zona` -- DROP TABLE IF EXISTS `zona`; CREATE TABLE IF NOT EXISTS `zona` ( `id_zona` int(11) NOT NULL AUTO_INCREMENT, `nombre_zona` varchar(50) NOT NULL, `valor_zona` float NOT NULL, `activo` varchar(1) DEFAULT NULL, PRIMARY KEY (`id_zona`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4; -- -- Volcado de datos para la tabla `zona` -- INSERT INTO `zona` (`id_zona`, `nombre_zona`, `valor_zona`, `activo`) VALUES (1, 'ZONA_1', 10000, 'S'), (2, 'ZONA_2', 6000, 'S'), (7, 'ZONA_3', 15000, 'S'); -- -- Restricciones para tablas volcadas -- -- -- Filtros para la tabla `domicilio` -- ALTER TABLE `domicilio` ADD CONSTRAINT `domicilio_ibfk_1` FOREIGN KEY (`id_mensajero`) REFERENCES `mensajero` (`id_mensajero`) ON UPDATE CASCADE, ADD CONSTRAINT `domicilio_ibfk_2` FOREIGN KEY (`id_zona`) REFERENCES `zona` (`id_zona`) ON UPDATE CASCADE, ADD CONSTRAINT `domicilio_ibfk_3` FOREIGN KEY (`id_forma_pago`) REFERENCES `forma_pago` (`id_forma_pago`) ON UPDATE CASCADE; -- -- Filtros para la tabla `mensajero` -- ALTER TABLE `mensajero` ADD CONSTRAINT `mensajero_ibfk_1` FOREIGN KEY (`id_tercero`) REFERENCES `tercero` (`id_tercero`) ON UPDATE CASCADE; -- -- Filtros para la tabla `usuario` -- ALTER TABLE `usuario` ADD CONSTRAINT `usuario_ibfk_1` FOREIGN KEY (`id_tercero`) REFERENCES `tercero` (`id_tercero`) ON UPDATE CASCADE, ADD CONSTRAINT `usuario_ibfk_2` FOREIGN KEY (`id_rol`) REFERENCES `rol` (`id_rol`) ON UPDATE CASCADE; -- -- Filtros para la tabla `usuario_empresa` -- ALTER TABLE `usuario_empresa` ADD CONSTRAINT `usuario_empresa_ibfk_1` FOREIGN KEY (`id_usuario`) REFERENCES `usuario` (`id_usuario`) ON UPDATE CASCADE, ADD CONSTRAINT `usuario_empresa_ibfk_2` FOREIGN KEY (`id_empresa`) REFERENCES `empresa` (`id_empresa`) ON UPDATE CASCADE; COMMIT; /*!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 */;
DROP TABLE default.PANEL_HIERARCHY ; CREATE TABLE default.PANEL_HIERARCHY ( device_hash string , device_name string , panel string , parent_panel string , child_panel string , change_date string , flag string ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' COLLECTION ITEMS TERMINATED BY '\002' MAP KEYS TERMINATED BY '\003' STORED AS TextFile ; LOAD DATA INPATH '/user/admin/base/TABLE/PANEL_HIERARCHY/part-m-00000' INTO TABLE default.PANEL_HIERARCHY ;
select CONTENT_BULLETIN from bulletin where ID_BULLETIN = 1
create database db_rh; use db_rh; create table tb_funcionarios( id_funcionario INT AUTO_INCREMENT, nome VARCHAR(255), email VARCHAR(255), cpf VARCHAR (255), cargo VARCHAR (255), salario FLOAT NULL, primary key (id_funcionario) ); insert into tb_funcionarios (nome, email, cpf, cargo, salario) values ("laiane karla","laianekarla@gmail.com","514-111-111.31", "dev junior", 10.000), ("rebeca andrade","rebecaprincesinha@gmail.com","111-111-111.53", "auxi adm", 1.100), ("rininho cosme","rininhodosax@gmail.com","111-111-520.40","marketing", 3.500); SELECT * from tb_funcionarios where salario>2000; SELECT * from tb_funcionarios where salario<2000; use db_rh; update tb_funcionarios set salario = 10.000 where id_funcionario = 2;
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 21, 2020 at 09:46 PM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.2.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `shoppingcart` -- -- -------------------------------------------------------- -- -- Table structure for table `cart` -- CREATE TABLE `cart` ( `cart_id` int(11) NOT NULL, `prod_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `quantity` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `product` -- CREATE TABLE `product` ( `pid` int(11) NOT NULL, `pname` varchar(100) NOT NULL, `pprice` int(11) NOT NULL, `pdetails` varchar(100) NOT NULL, `pimg` longblob NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `register` -- CREATE TABLE `register` ( `id` int(11) NOT NULL, `name` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, `address` varchar(100) NOT NULL, `phone` bigint(10) NOT NULL, `password` varchar(100) NOT NULL, `roleid` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `register` -- INSERT INTO `register` (`id`, `name`, `email`, `address`, `phone`, `password`, `roleid`) VALUES (5, 'admin', 'admin@gls.com', 'newone', 9876543210, '123', 1); -- -------------------------------------------------------- -- -- Table structure for table `role` -- CREATE TABLE `role` ( `role_id` int(11) NOT NULL, `role_name` varchar(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `role` -- INSERT INTO `role` (`role_id`, `role_name`) VALUES (1, 'admin'), (2, 'user'); -- -- Indexes for dumped tables -- -- -- Indexes for table `cart` -- ALTER TABLE `cart` ADD PRIMARY KEY (`cart_id`), ADD KEY `user_id` (`user_id`), ADD KEY `prod_id` (`prod_id`); -- -- Indexes for table `product` -- ALTER TABLE `product` ADD PRIMARY KEY (`pid`); -- -- Indexes for table `register` -- ALTER TABLE `register` ADD PRIMARY KEY (`id`), ADD KEY `roleid` (`roleid`); -- -- Indexes for table `role` -- ALTER TABLE `role` ADD PRIMARY KEY (`role_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `cart` -- ALTER TABLE `cart` MODIFY `cart_id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `product` -- ALTER TABLE `product` MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `register` -- ALTER TABLE `register` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `role` -- ALTER TABLE `role` MODIFY `role_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- Constraints for dumped tables -- -- -- Constraints for table `cart` -- ALTER TABLE `cart` ADD CONSTRAINT `cart_ibfk_1` FOREIGN KEY (`prod_id`) REFERENCES `product` (`pid`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `cart_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `register` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Constraints for table `register` -- ALTER TABLE `register` ADD CONSTRAINT `register_ibfk_1` FOREIGN KEY (`roleid`) REFERENCES `role` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT; /*!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 */;
CREATE TABLE PARAGRAF8VARSEL( uuid varchar2(255), aktorid varchar2(255), sendt timestamp, skalStoppes number(1,0), deaktivert timestamp ); alter table DIALOG add ( ulestParagraf8Varsel number(1,0), paragraf8_varsel_uuid varchar2(255) ); INSERT INTO DIALOG_EGENSKAP_TYPE( DIALOG_TYPE, OPPRETTET_DATO, OPPRETTET_AV, ENDRET_DATO, ENDRET_AV ) VALUES ('PARAGRAF8',CURRENT_TIMESTAMP,'KASSERT',CURRENT_TIMESTAMP,'KASSERT');