This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `myTable` (`student_name`,`student_age`) VALUES ("Baker Schwartz",35),("Emery Hodge",25),("Wesley Manning",35),("Akeem Mcintyre",28),("Brooke Ware",40),("Candace Abbott",29),("Ella Wiggins",30),("Kim Knowles",21),("Teegan Nixon",21),("Rhoda Armstrong",27),("Lars Harvey",40),("Harriet Hancock",34),("Tobias Mendez",25),("Brandon Vincent",29),("Cairo Acosta",27),("Blaze Vaughan",34),("Nomlanga Santana",29),("Timon Evans",25),("Noble Palmer",24),("Sierra Mcdonald",24),("Henry Bryan",21),("Nell Blackburn",33),("Bertha Pearson",30),("Freya Waters",39),("Kendall May",40),("Cade Blankenship",38),("Xena Faulkner",36),("Ramona Bond",24),("Vaughan Bender",29),("Hayden Ochoa",37),("Rebekah Welch",36),("Luke Heath",35),("Kennan Bowers",33),("Oleg Barlow",30),("Tana Juarez",21),("Gannon Williams",28),("Amela Meadows",22),("Laith Cole",23),("Shana Roman",30),("Asher Lester",26),("Brett Shepard",27),("Basil Serrano",40),("Sharon Hall",29),("Amelia Randolph",34),("Clarke Roth",22),("Conan Stokes",37),("Vielka Dick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `animal` (`animal_name`,`animal_age`,`animal_species`,`animal_sex`) VALUES ("Tate",22,"Zebra","Female"),("Benjamin",24,"Wolf","Female"),("Emma",9,"Elephant","Male"),("Hashim",12,"Giraffe","Female"),("Anastasia",11,"Lion","Male"),("Erich",17,"Rhino","Female"),("Ashely",20,"Parrot","Female"),("Amos",25,"Penguin","Male"),("Brent",12,"Lion","Female"),("James",11,"Parrot","Female"); | |
INSERT INTO `animal` (`animal_name`,`animal_age`,`animal_species`,`animal_sex`) VALUES ("Regina",5,"Penguin","Female"),("Zephania",16,"Wolf","Male"),("Lyle",23,"Penguin","Female"),("Orson",2,"Parrot","Male"),("Camden",25,"Wolf","Female"),("Iliana",19,"Parrot","Male"),("Berk",2,"Zebra","Female"),("Odysseus",22,"Wolf","Male"),("Brynn",19,"Giraffe","Male"),("Alvin",21,"Rhino","Male"); | |
INSERT INTO `animal` (`animal_name`,`animal_age`,`animal_species`,`animal_sex`) VALUES ("Gareth",21,"Giraffe","Male"),("Hiram",1,"Giraffe","Female"),("Hayley",30,"Flamingo","Male"),("MacKenzie",11,"Chimpanzee","Female"),("Seth",20,"Gorilla","Male |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE new_schema; #schema name | |
SELECT * FROM new_table ORDER BY new_column; #order by column | |
SELECT AVG(new_column) FROM new_table; #average | |
SET @median = (SELECT COUNT(*) FROM new_table) DIV 2; #variable to use as 'offset' in 'limit' | |
PREPARE median FROM 'SELECT * FROM new_table ORDER BY new_column LIMIT ?,1'; #? will be replaced by variable from 'using' | |
EXECUTE median USING @median; #execute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt install nginx | |
echo "server { | |
listen 80; | |
server_name marlene; | |
location / { | |
proxy_pass http://127.0.0.1:5560/; | |
} |