blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
133
path
stringlengths
3
276
src_encoding
stringclasses
33 values
length_bytes
int64
23
9.61M
score
float64
2.52
5.28
int_score
int64
3
5
detected_licenses
listlengths
0
44
license_type
stringclasses
2 values
text
stringlengths
23
9.43M
download_success
bool
1 class
c5d232ede33eded94adc5b4a22610a761afa39dd
SQL
ShubhangiD21/Trainne-assignment-shubhangi
/nodejs/node1_assign_Crud/src/mysql queries/queries.sql
UTF-8
1,880
3.421875
3
[]
no_license
/* database creation********/ create database liviano; use liviano; /* Student table creation************/ create table Student(SRoll_no integer, SName varchar(10), SMark integer); select * from student; commit; insert into Student(SRoll_no,SName,SMark)values(1,"Shubhangi",96); insert into Student(SRoll_no,SName,S...
true
5dfb3e3f7d25f9a2247319e6746ea2d9983d5b46
SQL
xiankai/weight-loss-backend
/backend.sql
UTF-8
636
3.5
4
[]
no_license
CREATE TABLE brands ( id serial PRIMARY KEY, country CHAR (2) NOT NULL, brand VARCHAR (255) NOT NULL, has_ingredients BOOLEAN NOT NULL, category VARCHAR (255) NOT NULL ) CREATE TABLE meals ( id serial PRIMARY KEY, brand_id INTEGER REFERENCES brands (id), name VARCHAR (255) NOT NULL, ...
true
6769b0ed7a2085987c59c3e0ef0443b7395066f1
SQL
openacs/download
/sql/oracle/download-create.sql
UTF-8
11,064
3.96875
4
[]
no_license
-- Note cr_items has available: -- parent_id -- name -- publish_status -- Note cr_revisions has available: -- title -- description -- publish_date -- content -- QUESTION: How do we store information about vendors like their -- URL, or a description -- -- Download Repository Instances: -- Eac...
true
24032efe0ee2a0b60bc45a80cd1451ae8314cde0
SQL
newbiewz/spring-boot-demo
/mybatis/src/main/resources/db/init_table.sql
UTF-8
331
2.59375
3
[]
no_license
CREATE TABLE `order` ( id BIGINT(20) not null AUTO_INCREMENT, order_id BIGINT(20) not null, item_id BIGINT(20) not null, sku_id BIGINT(20) not null, buyer_id BIGINT(20) not null, seller_id BIGINT(20) not null, create_time DATETIME not null, address VARCHAR(20) not null, PRIMARY ...
true
d9cc6b174a39d467cb2c6b5c4dcdd8b3915c0dcc
SQL
abronytska/leetcode_sql
/181_Emploee_earning_more_than_manager.sql
UTF-8
166
2.890625
3
[]
no_license
/* Write your PL/SQL query statement below */ select e.name as "Employee" from employee e join employee ee on e.managerId = ee.id and e.salary > ee.salary;
true
a5ce3c346e04806c264e15362f0f270fcebe9264
SQL
jarviscanada/jarvis_data_eng_ZiyangLin
/python_data_wrangling/psql/data_explore.sql
UTF-8
1,314
4.5
4
[]
no_license
-- Question 0: Show table schema \d+ retail; -- Question 1: Show first 10 rows SELECT * FROM retail limit 10; -- Question 2: Check # of records SELECT count(*) FROM retail; -- Question 3: number of clients (e.g. unique client ID) SELECT count(distinct(customer_id)) FROM retail; -- Question 4: invoice date range (e...
true
1a98cbe1febddd1b431f58fb5dfb4d09e604a0cf
SQL
JimmyGuarin/PurePrograming
/recursos/pureprograming.sql
UTF-8
1,901
2.875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 22-10-2015 a las 04:49:53 -- Versión del servidor: 5.6.21 -- Versión de PHP: 5.5.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
e840a996fe8c0a809ce98f390cc0b5f812eb9ea5
SQL
muntaza/Open_Persediaan
/sql2_persediaan/beban_rinci_sql/beban_barang4_kesbangpol.sql
UTF-8
380
2.625
3
[ "BSD-2-Clause", "BSD-3-Clause" ]
permissive
DROP VIEW IF EXISTS view_beban_barang4_kesbangpol; CREATE VIEW view_beban_barang4_kesbangpol AS SELECT *, beban * harga AS jumlah_harga FROM view_beban_barang3_kesbangpol WHERE 1 = 1 AND beban > 0 AND id_skpd = 24; GRANT ALL PRIVILEGES ON view_beban_barang4_kesbangpol TO lap_kesbangpol; REVOKE INSERT, UPDATE, D...
true
15fc460e53e75ec1c45a1df267c2454bc51ea2a1
SQL
junbjnnn/junbjnnn.github.io
/Java/Spring-QuanLyNhanSu/database/db.sql
UTF-8
188,204
3.046875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15.9 -- https://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 25, 2018 at 12:40 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 *...
true
1c6fa4dc2af3f83a3bf0047d651b179c8a6785ed
SQL
IxPhreaky/Musicon
/kontaktform.sql
UTF-8
2,463
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Vært: localhost -- Genereringstid: 27. 05 2014 kl. 12:25:28 -- Serverversion: 5.5.8 -- PHP-version: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_...
true
ebba386ff8733b347953dd69b4efe312d61a0259
SQL
jmilo13/ejerciciosSQL
/SQL -II/tema4.sql
UTF-8
494
3.75
4
[]
no_license
--consulta que devuelva la cantidad de profesores que dictan más de un curso en el turno Noche. SELECT COUNT(*) as 'Cantidad profesores' FROM(SELECT c.nombre FROM curso c LEFT JOIN profesor p ON p.id = c.PROFESOR_id WHERE turno = "Noche" group by id having count(*) > 1); --consulta para obtener la información de todos ...
true
18233c8a96140892d9c16f5f9fa95722d17c0399
SQL
mattharkness/sixthdev
/rantelope/rantelope.sql
UTF-8
1,756
2.921875
3
[]
no_license
/*/ * MySQL code for Rantelope tables. * @TODO: generate this from schema.py * * $Id$ /*/ CREATE TABLE rnt_author ( ID integer not null auto_increment primary key, username varchar(32), cryptpwd varchar(32), fname varchar(32), lname varchar(32), email varchar(32), homepage varchar(64) ...
true
66a213ec9aa270ff3286fcc371b0426d6854a17e
SQL
psekan/ClassifyRSAKeyWeb
/app/data/database-mysql.sql
UTF-8
676
2.625
3
[ "MIT" ]
permissive
DROP TABLE IF EXISTS post; CREATE TABLE IF NOT EXISTS post ( id INTEGER PRIMARY KEY AUTO_INCREMENT, correct BOOLEAN, source TEXT, ip TEXT, time INTEGER ); DROP TABLE IF EXISTS `key`; CREATE TABLE IF NOT EXISTS `key` ( id INTEGER PRIMARY KEY AUTO_INCREMENT, p...
true
69dd333c117c50ab0fae476a099a8ec7c6176837
SQL
algebrateam/phpdev2018
/public/icrnjac/zadaca3.sql
UTF-8
3,965
3.78125
4
[ "MIT" ]
permissive
zadatak 3.2. USE fakultet; SELECT mbtStud, concat(imeStud,' ',prezStud) AS 'Ime i prezime' FROM stud;/* zadatak 3.3. SELECT imeStus FROM stud GROUP BY imeStud ORDER BY imeStud DESC; zadatak 3.4. SELECT mbrStud from ispit WHERE sifPred=146; zadatak 3.5. SELCET imeNastavnik, prezNastavnik, (koef+0.4)*800 AS 'Placa' FROM...
true
2dd565b59e1646b69e0729837f874998d7276cef
SQL
wangxiaoyu92/zhsyj_V_2_0
/src/dbscript/201608/20161017_jyjccydj_ly.sql
UTF-8
3,316
2.71875
3
[]
no_license
CREATE TABLE syjzhpt.jyjccydj ( id VARCHAR(32) NOT NULL COMMENT '主键', cybh VARCHAR(200) DEFAULT NULL COMMENT '抽样编号', cyfl VARCHAR(32) DEFAULT NULL COMMENT '抽样分类', bcydwcomid VARCHAR(32) DEFAULT NULL COMMENT '被抽样单位ID', bcydw VARCHAR(800) DEFAULT NULL COMMENT '被抽样单位', bcydwfl VARCHAR(255) DEFAULT NULL COMMEN...
true
ff62ed9d6158d8fc03e2905502df7c20345c3590
SQL
dhidalgog/E16CP2A1
/actividad032.sql
UTF-8
2,686
4.40625
4
[]
no_license
CREATE DATABASE Pintagram; \c Pintagram CREATE TABLE Users( id SERIAL, first_name varchar, last_name varchar, email varchar, PRIMARY KEY (id) ); CREATE TABLE Images( id SERIAL, img_name varchar, owner_id INTEGER, PRIMARY KEY (id), FOREIGN KEY (owner_id) REFERENCES Users(id) ); CREATE TABLE Evaluat...
true
576079a02e9a15ff0d7da967fbb3581fd3c3bd20
SQL
earth-data/berg-data
/timeseries.cql
UTF-8
3,088
3.359375
3
[]
no_license
/* Berg data */ /* Always clean to not run against existing data. */ DROP KEYSPACE IF EXISTS timeseries; CREATE KEYSPACE timeseries WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 }; CREATE TABLE timeseries.berg_data ( sensor_id text, iceberg_name text, year int, month int, day int, ...
true
c5997bff327b2a59e23927c7d2a7e481674216d6
SQL
BRSADT/cometaRep
/SQL/cometa-5.sql
UTF-8
7,330
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 06-12-2018 a las 03:26:59 -- Versión del servidor: 5.7.14 -- Versión de PHP: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
true
70cae8aa71471a1d8d9c36304b81ad8383c0216f
SQL
takemetothemoon/Programming-in-SQL
/Lesson 3/SqlCh5ex7.sql
UTF-8
259
4.125
4
[]
no_license
SELECT EmailAddress, COUNT(DISTINCT ProductID) AS TotalProducts FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID JOIN OrderItems ON Orders.OrderID = OrderItems.OrderID GROUP BY EmailAddress HAVING COUNT(DISTINCT ProductID) > 1;
true
e37c698b38f7cd2f8b64ac8510865cdbdcb8371b
SQL
georgezeng/com.sourcecode.malls.db
/src/main/resources/db/v13.sql
UTF-8
503
3.125
3
[]
no_license
--liquibase formatted sql --changeset admin:13 CREATE TABLE `goods_brand` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `merchant_id` bigint(20) NOT NULL, `order_num` int(11) NOT NULL, `name` varchar(50) NOT NULL, `logo` varchar(255) NOT NULL, `create_by` varchar(50) NOT NULL, `update_by` varchar(50) NOT NULL, `...
true
dd6b849927b956d77a3070f1532510ab01812ac0
SQL
djones01/CHub
/CFG_HRT_TALENT_POOL_MEMBER_CONSTRAINT.sql
UTF-8
980
2.71875
3
[]
no_license
-------------------------------------------------------- -- Constraints for Table CFG_HRT_TALENT_POOL_MEMBER -------------------------------------------------------- ALTER TABLE "HCM_ADMIN"."CFG_HRT_TALENT_POOL_MEMBER" ADD CONSTRAINT "CFG_HRT_TALENT_POOL_MEMBER_PK" PRIMARY KEY ("POOL_MEMBER_ID") USING INDEX PCTFR...
true
e96a49d7fd514cc74d591b989d232c4f1cf05782
SQL
omegazip/dba_scripts
/custom/Scripts_DBACA/showuser.sql
UTF-8
1,172
3.671875
4
[]
no_license
set pause ...more set pagesize 24 set linesize 9999 set numwidth 5 column SID_Serial format a45 column Idle format a5 column LkMins format 999 column Wait format a5 column Ora_User format a17 column TERMINAL format a17 prompt alter system kill session ' '; select substr(vp.username, 1, 8) "O/S Usr", vp.spid...
true
9ac0f7e70969b3843c469080a4161fdddea2c705
SQL
z261848090/TeacherStudySystem
/teacher_study_system(1).sql
UTF-8
21,065
3.265625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- 主机: 127.0.0.1 -- 生成日期: 2013 年 05 月 27 日 10:03 -- 服务器版本: 5.5.27 -- PHP 版本: 5.4.7 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_SE...
true
24cd48ec72ed51eb7b6b593ba177c8248342897f
SQL
Buckshotdesigns/bamazon
/bamazon.sql
UTF-8
1,256
3.484375
3
[]
no_license
DROP DATABASE IF EXISTS bamazonDB; CREATE DATABASE bamazonDB; USE bamazonDB; CREATE TABLE products ( id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(90) NULL, department_name VARCHAR(90) NULL, price decimal(10,4) NULL, stock_quantity INTEGER(10)null, PRIMARY KEY (id) ); INSERT INTO products (produc...
true
49affe41e48f704deb83558c9f40ea3dfd42abd5
SQL
bpincelamattos/OnFitness
/models/schema.sql
UTF-8
897
3.8125
4
[]
no_license
CREATE TABLE users ( id serial primary key, provider_id bigint, name varchar (60), email varchar (60), pic_path varchar, about_me varchar, password varchar (60) ); CREATE TABLE workoutPost ( id serial primary key, path text not null, exercise_type text not null, exercise_des...
true
213f92ad4ef51d983179ef288d1f958e6e46d471
SQL
mingik/catalog
/application.sql
UTF-8
1,888
3.546875
4
[]
no_license
-- Table definitions for the catalog project. -- -- Put your SQL 'create table' statements in this file; also 'create view' -- statements if you choose to use it. -- -- You can write comments in this file by starting them with two dashes, like -- these lines here. DROP DATABASE IF EXISTS catalog; CREATE DATABASE cata...
true
6dd9136601f846d657e06466cb26f2c487353993
SQL
roeybenhayun/statistical_ml
/database/solution.sql
UTF-8
5,051
4.1875
4
[]
no_license
/* create table users ( userid int, name text, primary key (userid) ); create table movies ( movieid int, title text, primary key (movieid) ); create table taginfo ( tagid int, content text, primary key (tagid) ); create table genres ( genreid int, name text, ...
true
5f4b3ee8a91249e30acf8034e065e5471293d504
SQL
eNobreg/holbertonschool-higher_level_programming
/0x0D-SQL_introduction/101-avg_temperatures.sql
UTF-8
126
3.015625
3
[]
no_license
-- Average Temperature calculator SELECT city, AVG(value) as avg_temp FROM temperatures GROUP BY city ORDER BY avg_temp DESC;
true
03c54a70c2b1fbc11a48610af9c52fddbb07350d
SQL
hamzashah109/Learning
/emp.sql
UTF-8
1,925
3.015625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.8.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 26, 2019 at 10:47 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 5.6.36 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
true
fe4aa5e4e21111ee409b8b189dffcfe78c9239e8
SQL
stwiley/CS--180
/lab2/query5.sql
UTF-8
440
3.296875
3
[]
no_license
SELECT Sales.customer_id, Sales.purchase_date FROM lab2.Sales WHERE Sales.shipped = 'true' AND Sales.price > 49.98 AND Sales.store_id IN (SELECT Stores.store_id FROM lab2.Stores WHERE Stores.manager = 'George Jetson') AND Sales.product_id IN (SELECT Products...
true
fac13dd3f7879b9d7ae8854cfc08c202d2afc014
SQL
vickybieghsPXL/PXL-DIGITAL
/Eerste_jaar/Big-Data/Examen/3-1.sql
UTF-8
906
3.53125
4
[]
no_license
/* uitvoeren -> exec procedure_naam of execute*/ CREATE OR REPLACE PROCEDURE toon_laatste_emp IS v_employee_id employees.employee_id%type; v_last_name employees.last_name%type; v_hire_date employees.hire_date%type; BEGIN SELECT employee_id, last_name, hire_date into v_employee_id, v_last_name, v_hire_date from e...
true
6354de29fd9a22cd5c7017b3f7ad8ab6ee0db75f
SQL
Abikayusri/Udacoding-Task-Week5
/kampus.sql
UTF-8
3,049
3.1875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 19 Jun 2020 pada 11.23 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
true
3b36cdd4e04eabcfed78ecc948ee22b90dfac7b7
SQL
rajndev/academypgh-bootcamp-projects
/TwisterSQLApp/SQLQuery1.sql
UTF-8
101
2.515625
3
[]
no_license
select * from Tweets inner join Users On Tweets.UserId = Users.Id Where UserName = 'Rubberducky27'
true
53a327398986fd15c0eefbc7c570001af41f6205
SQL
tqwhite/multiSite
/management/sqlScripts/bookmarks/showCategories.sql
UTF-8
202
3.515625
4
[]
no_license
select c.name, b.uri, b.shortId from categories as c left join bookmarkCategoryNodes as bcn on bcn.categoryRefId=c.refId left join bookmarks as b on b.refId=bcn.bookmarkRefId order by c.created desc;
true
05eb2b2f15990347e5ae8306f76587fe36a1e2a9
SQL
ruizseh/exercicios-MySQL
/ExercicioDB/Exercicio6.sql
UTF-8
2,211
3.40625
3
[]
no_license
-- create database db_petshop /*use db_petshop; create table tb_animais( id bigint auto_increment, especie varchar(100), nome varchar(100), raca varchar (100), peso float, primary key (id) )*/ -- insert into tb_animais (especie, nome, raca, peso) value ("Cachorro", "Belinha", "Vira Lata", 10) -- select * from tb_anim...
true
28047d646453ad4e7b53c9a298730a672fd9bf02
SQL
msotiroff/Softuni-learning
/C# DB Module/DB Basics PL-SQL/Homeworks/07. DB-Basics-MSSQL-Subqueries-and-Joins/05.EmployeesWithoutProjects/SQLQuery1.sql
UTF-8
157
3.328125
3
[ "MIT" ]
permissive
SELECT TOP 3 e.EmployeeID, e.FirstName FROM Employees AS e LEFT JOIN EmployeesProjects AS ep ON e.EmployeeID = ep.EmployeeID WHERE ep.EmployeeID IS NULL
true
d9e38cf27451f24da1ffbc5e5c1e77bb6417fbbc
SQL
SimonDein/launch
/course_180_sql_and_relational_databases/exercises/dml_data_manipulation_language/5_aggregate_functions.sql
UTF-8
287
3.859375
4
[]
no_license
-- Write an SQL query that returns a result table with the name of each device in our database together with the number of parts for that device. SELECT devices.name, COUNT(parts.id) AS parts FROM devices JOIN parts ON devices.id = parts.device_id GROUP BY devices.name;
true
63fb41d7df607a6abe751f8f3c8d188c3e2f687c
SQL
HTTPArchive/almanac.httparchive.org
/sql/2022/accessibility/form_required_controls.sql
UTF-8
3,170
3.578125
4
[ "Apache-2.0" ]
permissive
#standardSQL # Various stats for required form controls (form controls being: input, select, textarea) CREATE TEMPORARY FUNCTION requiredControls(payload STRING) RETURNS STRUCT<total INT64, asterisk INT64, required_attribute INT64, aria_required INT64, all_three INT64, asterisk_required INT64, asterisk_aria INT64, requ...
true
e3ac89d6ea02e2a91551eaab98389c7c7a7361be
SQL
KisialiovaMaria/OOP
/bd_this.sql
UTF-8
6,680
3.34375
3
[]
no_license
-- MySQL Script generated by MySQL Workbench -- Sun Dec 6 16:18:39 2020 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON...
true
0f985edd933479cd22caa28533d64cad91471466
SQL
tkilias/script-languages
/tests/lang/python/metadata.sql
UTF-8
5,644
3.078125
3
[ "MIT" ]
permissive
CREATE PYTHON SCALAR SCRIPT get_database_name() returns varchar(300) AS def run(ctx): return exa.meta.database_name / create python scalar script get_database_version() returns varchar(20) as def run(ctx): return exa.meta.database_version / create python scalar script get_script_language() emits (s1 varchar(300), s2 ...
true
f57c1b261c850d13abedf9f262a3398ec5361325
SQL
GovidWare/carritocompras
/carrito.sql
UTF-8
12,480
2.9375
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
-- -- PostgreSQL database dump -- -- Dumped from database version 9.6.18 -- Dumped by pg_dump version 12.3 -- Started on 2020-08-26 18:12:00 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_cata...
true
44a9ec3ce533a08efab70c7adcfcc10ad27fb3f5
SQL
richa27gpt/Database-Management
/Red_Oracle_Book_Unit5.sql
WINDOWS-1252
1,169
3.921875
4
[]
no_license
--1.Create a list of user IDs that contains the first four letters of the ename and the last three numbers of their manager number ----(column mgr), concatenated together with a dash in between. The output should be formatted like this: SMIT-902, ALLE-698 (and so on) Select substr(ename, 1, 4) || '-' || substr(...
true
424512eb46a924cde40b0426e71456d1048e44d8
SQL
blackhack123/sistemagestion
/db_routing_gear_multi.sql
UTF-8
54,718
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.4.15.10 -- https://www.phpmyadmin.net -- -- Servidor: localhost -- Tiempo de generación: 22-01-2019 a las 21:49:32 -- Versión del servidor: 5.6.41 -- Versión de PHP: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C...
true
697de404bc11d1fddfdbbb88a050cf119a23e104
SQL
stsh1/databasecomp1006
/college.sql
UTF-8
1,523
3.15625
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 05, 2015 at 11:26 AM -- Server version: 5.6.12-log -- PHP Version: 5.4.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
true
55c4376ec5b19cc49a0bdbcc8928d6803f495dda
SQL
Akaash-Agarwal/Performance-Analysis-Using-SQL
/7_Final_Project.sql
UTF-8
9,621
4.46875
4
[]
no_license
/* 1. First, I’d like to show our volume growth. Can you pull overall session and order volume, trended by quarter for the life of the business? Since the most recent quarter is incomplete, you can decide how to handle it. */ SELECT YEAR(website_sessions.created_at) AS yr, QUARTER(website_sessions.created_at) AS qtr,...
true
a5dc76b4ed1e6444982d60aa3012db7e5c23c089
SQL
MehGokalp/vendor-lion
/src/main/resources/schema.sql
UTF-8
869
3.625
4
[ "MIT" ]
permissive
CREATE TABLE `currency` ( `id` INT NOT NULL AUTO_INCREMENT, `code` VARCHAR(4) NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `code_UNIQUE` (`code` ASC)); CREATE TABLE `card` ( `id` INT NOT NULL AUTO_INCREMENT, `balance` INT NOT NULL, `currency_id` INT NOT NULL, `activation_date` DATE NOT NULL, `expire_da...
true
092779a8c6b43ca935950c7ea047af040713e222
SQL
liviaoliveiraa/MySQL--Generation
/Exercicio03.sql
UTF-8
1,022
3.34375
3
[]
no_license
create database db_escola; create table estudantes( id bigint auto_increment, nome varchar(255), serie varchar(255), nota int, ra int, primary key(id) ); insert into estudantes (nome, serie, nota, ra) values ("Carlos", "5 ano", 5, 896325); insert into estudantes (nome, serie, nota, ra) values ("Luiza", "7 ano", 8, 74...
true
1ca69ba89787f3c27b3edd8d2991cf4f2043ba57
SQL
nuiip/uas_mp_s5
/db/db.sql
UTF-8
11,175
3.140625
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.7.31 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 11.1.0.6116 -- -------------------------------------------------------- /...
true
28d523465cb6a45377ce6ac7481fff5eee79a332
SQL
GuilhermeBraz/TF1BancosDeDados1
/TF1_DUPLA/TF1_AntonioBarreto_180030272/TF_1E2_Popula_Final_por_Dupla_AntonioBarreto.sql
UTF-8
5,173
2.890625
3
[ "MIT" ]
permissive
-- -------- << AntonioBarreto - TRABALHO FINAL TEMA 1 >> ---------- -- -- SCRIPT DE POPULACAO (DML) -- -- Data Criacao ...........: 25/10/2021 -- Autor(es) ..............: Antonio Ruan Moura Barreto e Guilherme Verissimo Cerveira Braz -- Banco de Dados .........: MySQL 8.0 -- Base de Dados (nome) .....
true
59f0dd5691b18dc19a47d7a1266808ced9e3ec39
SQL
lawrenceychung/OMIS-105
/Project/Create Tables & Values.sql
UTF-8
40,291
3.578125
4
[]
no_license
-- Create Customer Table CREATE TABLE Customer_T (CustomerID NUMERIC(11,0) NOT NULL, CustomerName VARCHAR(25) NOT NULL, CustomerPhone VARCHAR(14), CONSTRAINT Customer_PK PRIMARY KEY (CustomerID)); -- Create Pet Table CREATE TABLE Pet_T (PetID NUMERIC(11,0) NOT NULL, PetName VARCHAR(25) NOT NULL,...
true
4d718e47e970dd0b9ed201be0873bf454c670b85
SQL
cdavidsp/Academico
/api/db/db_Manage_Film_Example_db_Schema.sql
UTF-8
1,775
3.96875
4
[]
no_license
-- -- Database: `Manage_Film_Example_db` -- CREATE DATABASE IF NOT EXISTS `Manage_Film_Example_db`; USE `Manage_Film_Example_db`; CREATE TABLE IF NOT EXISTS `user` ( `username` varchar(30) NOT NULL UNIQUE, `password` varchar(32) NOT NULL, `name` varchar(30) , `surname` varchar(30) , `mail` varchar(30) , -...
true
da8b56934498be5e5b18499f7a1c39850857af00
SQL
ClementRb/laboDevWeb
/instagram.sql
UTF-8
2,337
3.28125
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : mer. 18 avr. 2018 à 09:11 -- Version du serveur : 5.7.19 -- Version de PHP : 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
c97c1085f0a054405b4c4f930c7b0da321d8802f
SQL
hirosuzuki/isucon2-tuned
/tools/sql/isumaster.sql
UTF-8
970
3.09375
3
[]
no_license
CREATE DATABASE IF NOT EXISTS isumaster2 DEFAULT CHARACTER SET 'utf8'; CREATE USER 'isumaster2'@'%' IDENTIFIED BY 'throwing'; GRANT ALL ON isumaster2.* TO 'isumaster2'@'%'; CREATE USER 'isumaster2'@'localhost' IDENTIFIED BY 'throwing'; GRANT ALL ON isumaster2.* TO 'isumaster2'@'localhost'; FLUSH PRIVILEGES; CREATE T...
true
20a53d23af1ff06ba0d7375ac90b33af8bd376f1
SQL
ycy53589793/Workspaces
/app/src/sql/create_color.sql
UTF-8
681
2.96875
3
[]
no_license
--颜色表 create table status_ ( id_ int, --主键 order_id_ int, --外键 creator_ varchar(36), --创建人 create_time_ date, --创建时间 modifier_ varchar(36), --修改人 modify_time_ date, --修改时间 rec_ver_ int, --版本号 rec_st...
true
caf335cc270e9a6bc6ad195dd95a734db857d4bb
SQL
loganhasson/flatiron-homework
/sql-book/artists_03.sql
UTF-8
404
3.328125
3
[]
no_license
/* first create a copy of the table missing one column (number_of_recordings) */ CREATE TABLE musicians_2( name TEXT, age INTEGER, rating REAL, genre TEXT, instrument TEXT, nationality TEXT, phone_number INTEGER, address TEXT, label TEXT ); /* then drop original table */ DROP TABLE musicians; /* finally, r...
true
fecba733f9dc99404794941b0719bd3828c56d9e
SQL
ldevergnies/siteMairie
/DATABASE.sql
UTF-8
2,312
3.53125
4
[]
no_license
CREATE DATABASE fil_rouge CHARSET=utf8; CREATE USER 'java'@'localhost' IDENTIFIED BY 'filrouge'; GRANT SELECT, UPDATE, DELETE, INSERT ON fil_rouge.* TO 'java'@'localhost'; USE fil_rouge; CREATE TABLE Utilisateur ( id INT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, nom VARCHAR(25) NOT NULL, prenom VARCHAR(25) NOT...
true
51226a0f71e5978a8fcf12d2837762e21107e453
SQL
LeanRoidzaid/ORTCA-Frontend
/db-init/z_datos.sql
UTF-8
1,972
2.640625
3
[]
no_license
INSERT INTO `db_elaiss`.`usuarios` ( Apellido, DNI, fh_alta, idCentro, mail, Nombre, pass, usuario ) VALUES ( 'root', '00000000', '2019-12-12 00:00:00', 1, 'gscigliotto@gmail.com', 'Admin', '$2b$04$GUm9gmkigrX7ThLym6UolO6734pOxONyLQ9BuWA5rpUUmBpBnwBjy', ...
true
9db3008840e0da049c4e78a0303da08542bcfc9e
SQL
meowwka/laboratory72
/src/main/resources/db/migration/V1__create_tables.sql
UTF-8
1,021
3.71875
4
[]
no_license
use `chat72`; CREATE TABLE `users` ( `id` INT auto_increment NOT NULL, `name` varchar (128) NOT NULL , PRIMARY KEY (`id`)); insert into `users` values (1,'User1'), (2,'User2'); CREATE TABLE `chats` ( id int auto_increment primary key not null, name varchar(255) not null, time datetime(...
true
61b91a39397b036c92a26006152b51fbd02b9bb8
SQL
MohamedSellahi/SqlBook
/MariaDb-book/DDL+drop.sql
UTF-8
3,913
4
4
[]
no_license
-- drop table prereq; -- drop table time_slot; -- drop table advisor; -- drop table takes; -- drop table student; -- drop table teaches; -- drop table section; -- drop table instructor; -- drop table course; -- drop table department; -- drop table classroom; CREATE TABLE classroom ( building VARCHAR(15), room_...
true
46a4596d9ef17ca147c3258fae071b373f922477
SQL
ysebbar-4a5a/opdrachtgebruikersrol
/sql-dump/gebruiker.sql
UTF-8
1,656
3.109375
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 08 jun 2017 om 14:25 -- Serverversie: 10.1.21-MariaDB -- PHP-versie: 7.0.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT...
true
ed5ef3eb3365f0b6031bf42533b7ff083ac7aa52
SQL
Smit36/CS-561-Database-Management-System-Stevens
/Assignment 2/query1.sql
UTF-8
896
3.9375
4
[]
no_license
with t1 as (select cust, prod, state, round(avg(quant),0) as cust_avg from sales group by cust, prod, state), t2 as (select t1.cust, t1.prod, t1.state, t1.cust_avg, round(avg(s.quant),0) as other_state_avg from t1, sales as s where t1.cust = s.cust and t1.prod = s.prod and t1.state != s.state group by t1.cust, t1.pr...
true
cbca95f00a7b3015765f3197eef235ddbc39ee70
SQL
SaraPasinato/db-university
/join_query.sql
UTF-8
2,619
4.25
4
[]
no_license
-- ! 1)Selezionare tutti gli studenti iscritti al Corso di Laurea in Economia SELECT `students`.`name`,`students`.`surname`,`degrees`.`name` FROM `students` JOIN `degrees` ON `students`.`degree_id`=`degrees`.`id` WHERE `degrees`.`name`='Corso di Laurea in Economia'; -- ! 2) Selezionare tutti i Corsi di Laurea del Dipa...
true
70a93887d4581de5fe796ebb3c09bca2f029d2a3
SQL
Azure4Arjun/t-sql
/OBJECTS_IN_MEMORY.sql
UTF-8
2,772
4.5625
5
[]
no_license
SELECT wt.session_id, wt.wait_type, wt.wait_duration_ms, s.name AS schema_name, o.name AS object_name, i.name AS index_name FROM sys.dm_os_buffer_descriptors bd --DMV Returns information about all the data pages that are currently in the SQL Server buffer pool-- JOIN ( SELECT *, CHARINDEX('...
true
f7f50f061284f32b93d55c2e90d30b1e086434ed
SQL
ricky-davis/database-exercises
/adlister_creation.sql
UTF-8
858
3.796875
4
[]
no_license
create database adlister; use adlister; create table Users ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, email VARCHAR(50) NOT NULL, password VARCHAR(50) NOT NULL, PRIMARY KEY (id) ); create table Ads ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(50) NOT NULL, description TEXT NOT N...
true
690f46c6eaeb56287ddad24e08ffe3de1a36ba3b
SQL
KarthikRammoorthy/GymConferatur
/DBQueries.sql
UTF-8
4,944
3.96875
4
[]
no_license
CREATE DATABASE GymConferaturDB; use GymConferaturDB; alter table Owner add column Owner_Password_Salt varchar(500) NOT NULL; create table Owner( Owner_ID INT NOT NULL AUTO_INCREMENT, Owner_Number INT NOT NULL, Owner_Password_Hash varchar(500) NOT NULL, Owner_Password_Salt varchar(500) NOT NULL, Own...
true
66f45d231b173495212dd2973b471fc6c4808cee
SQL
idemos/assist
/database.sql
UTF-8
8,032
3.046875
3
[]
no_license
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versione server: 5.6.16-1~exp1 - (Ubuntu) -- S.O. server: debian-linux-gnu -- HeidiSQL Versione: 9.5.0.5196 -- -------------------------------------------------------- /*!4...
true
e450cab236f39775834cef82c4caeb01a3283f56
SQL
george887/database-exercises
/temp_tables_practice.sql
UTF-8
3,570
4.53125
5
[]
no_license
# Creating a temp table of employees_with_departmnents, dropping dept_no, and adding email for each employees_with_departmnents # Created temp table CREATE TEMPORARY TABLE employees_with_departments AS SELECT emp_no, first_name, last_name, dept_no, dept_name FROM employees.employees JOIN employees.dept_emp USING(emp_n...
true
d54ec3b3f149e544a2df1a81d65f5e3ce0e039ca
SQL
nsouff/supermarket-database
/REQ/req18.sql
UTF-8
210
3.09375
3
[ "MIT" ]
permissive
-- XVIII) -- Contrainte : -- Renvoie le prix moyen pour chaque type de produit -- Remarque SELECT P.type_produit, TRUNC( CAST (AVG(P.prix) AS NUMERIC), 2) AS prix_moy FROM produits P GROUP BY (P.type_produit);
true
9a08f3a26fede1ff05718b7de6595814f08a6add
SQL
unmbrenda/Storefront
/sql/001_CreateSchema.sql
UTF-8
1,048
3.609375
4
[]
no_license
drop database if exists bamazon; create database bamazon; use bamazon; create table department ( departmentId int not null auto_increment, departmentName VarChar(50) not null, overheadCosts decimal(13, 2) not null default 0, primary key (departmentId) ); insert department (departmentName, overheadCosts) values (...
true
ac4011a262c324592ac0f4f783a20a667c74413f
SQL
gitgsundar/sql
/mon_cdb_ts.sql
UTF-8
3,962
3.65625
4
[]
no_license
-- File : MON_CDB_TS.SQL -- Description : Monitor Tablespaces of Container Database.. -- Info : Update Spool information as required to get the spool output. set pages 9999 set verify off col Instance heading 'Environment Info' format a100 col Instance_name heading 'Instance' format a10 col con_name ...
true
e6bb35bec7504e75e69a69758efaa435da75c5e7
SQL
kerrykato/SQL-Scripts
/Support Toolbox/syncProcesses_Summary/dbo.syncSummary_Import.udf
UTF-8
2,347
3.78125
4
[]
no_license
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[syncSummary_Import]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) DROP FUNCTION [dbo].[syncSummary_Import] GO SET ANSI_NULLS OFF GO SET QUOTED_IDENTIFIER OFF GO CREATE FUNCTION [dbo].[syncSummary_Import] ( @startDate datetime = null ...
true
7524a8924ee0bc69f25c94322d5c2322951e2a0c
SQL
helene348/papyrus_exercise
/tables_papyrus.sql
UTF-8
1,800
3.5
4
[]
no_license
drop table if exists "FOURNIS" cascade; drop table if exists "LIGCOM" cascade; drop table if exists "ENTCOM" cascade; drop table if exists "VENTE" cascade; drop table if exists "PRODUIT" cascade; create table "PRODUIT" ( "CODART" char(4) not null, "LIBART" varchar(25) not null, "STKALE" smallint not null,...
true
e026253a642d0dde1b4598ed01d0c930540ecbb4
SQL
NomanAliZainozai/PHP-Home-Work
/school.sql
UTF-8
1,392
2.796875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Oct 05, 2020 at 08:12 AM -- Server version: 10.4.10-MariaDB -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SE...
true
e3d61cbe3ed44dc8a12e3831e5b940e8244e36d2
SQL
victoryckl/w3cschool
/sql/localhost/cybertron/真题测试.sql
UTF-8
33,185
3.875
4
[ "Apache-2.0" ]
permissive
SELECT DISTINCT(SUBSTR(title FROM 1 FOR 5)) FROM xkb_questions WHERE SUBSTR(title FROM 1 FOR 1)='<'; SELECT * FROM xkb_questions WHERE SUBSTR(title FROM 1 FOR 2)='<<'; ###################################### SELECT * FROM xkb_questions WHERE id IN (SELECT question_id FROM xkb_paperques WHERE paperId=226255); SELECT t...
true
6192777d23577a775dba98dee8d90eb9a105c6ee
SQL
Luuck4s/Save-Money
/db_saveMoney.sql
UTF-8
686
3.28125
3
[]
no_license
create database db_savemoney; use db_savemoney; create table tb_usuario( cd_email varchar(80) not null, nm_usuario varchar(80) not null, cd_senha varchar(60) not null, cd_pergunta_seguranca int not null, resposta_seguranca varchar(60) not null, constraint pk_usuario primary key(cd_email)); create table tb_valores( i...
true
f21f29044907d6a5101c911f20c9fa0e323dcd8f
SQL
jaimeirazabal1/app_grabaciones_steff
/sql.sql
UTF-8
10,326
3.21875
3
[ "BSD-3-Clause" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 23-02-2015 a las 00:48:31 -- Versión del servidor: 5.6.17 -- Versión de PHP: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA...
true
d57b55ab2e08acf98cc56aa44bb0dd8c02245960
SQL
soarescbm/e-cidade
/e-cidade/db/DML/dml_6991.sql
ISO-8859-1
1,836
2.984375
3
[]
no_license
create temporary table w_up_6991_db_syscampo as select * from db_syscampo limit 0; insert into w_up_6991_db_syscampo values(22030,'s152_subjetivo','text','Campo que possibilita o registro da parte subjetiva da anamnese da consulta,ou seja,os dados dos sentimentos e percepes do cidado em relao...
true
81660bbeef7fc13422cb25279984b3ae0b3b9622
SQL
duychinhnguyenvn/portalproject
/Document/Development/2_Analysis_Design/3_Database_Design/Diagram eshoolink/selectHocSinhByID.sql
UTF-8
1,637
2.921875
3
[]
no_license
SELECT hocsinh.tenhocsinh, hocsinh.gioitinh, hocsinh.ngaysinh, hocsinh.sonha, hocsinh.tongiao, hocsinh.hinhanh, hocsinh.ghichu AS ghichuhocsinh, hocsinh.ketnapdoan, hocsinh.ketnapdoi, hocsinh.ngayvaodoan, hocsinh.ngayvaodoi, tinh.tentinh, quanhuyenthanhpho.tenquanhuyenthanhpho, ...
true
42322b2fb2bd330da6cca2e16ec63a62703600d6
SQL
debjava/hibernate-2017
/table-per-class-hierarchy/mysql/ddl.sql
UTF-8
191
2.78125
3
[]
no_license
drop table IF EXISTS Employee; create table Employee ( id BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(30) , type VARCHAR(30) NOT NULL, salary FLOAT(7,3), PRIMARY KEY (id) );
true
4157d855e796fa9d642a298d500bc2d929f91477
SQL
nachomartinez30/AbiesProject
/Masters Query/FotografiasHemisfericasCons.sql
UTF-8
1,297
3.609375
4
[]
no_license
SELECT --Informacion de UPM upm.UPMID, upmMalla.Estado, upmMalla.Municipio, upm.FechaInicio, upm.FechaFin, --información de la tabla sitio- sitio.Sitio, claveSerieV.TipoVegetacion , faseSucecional.Clave AS FaseSucecional, CASE sitio.ArbolFuera WHEN 1 THEN 'SI' WHEN 0 THEN 'NO' END ArbolFuera, sitio.Condici...
true
9c929dc163de3f099b825dd9ed3a6d0befd470f0
SQL
nriqu322/sql_zoo_answers
/9_window_function.sql
UTF-8
1,253
3.796875
4
[]
no_license
SELECT lastName, party, votes FROM ge WHERE constituency = 'S14000024' AND yr = 2017 ORDER BY votes DESC; SELECT party, votes, RANK() OVER (ORDER BY votes DESC) as posn FROM ge WHERE constituency = 'S14000024' AND yr = 2017 ORDER BY party; SELECT yr, party, votes, RANK() OVER (PARTITION BY yr ORDER...
true
9b05246d7c3c42f013752be22b22336cf0de86f8
SQL
vickazy/SIM-Sarpras
/database/tugas.sql
UTF-8
1,887
2.96875
3
[ "MIT" ]
permissive
-- phpMyAdmin SQL Dump -- version 4.6.5.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 07, 2017 at 05:49 PM -- Server version: 10.1.21-MariaDB -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE...
true
cdd1bb98d6eabf8c10551bda178d89cbfbe20b09
SQL
kapilgulwaniiii/CCTech
/uploads.sql
UTF-8
1,542
2.921875
3
[]
no_license
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 14, 2020 at 04:33 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
true
c37fedcf863069687f7495593121039a7993fcbb
SQL
Lortus64/Microbit-project
/database/setup.sql
UTF-8
698
3.703125
4
[]
no_license
-- Skapa databass -- CREATE DATABASE indproj; DROP DATABASE IF EXISTS indproj; CREATE DATABASE IF NOT EXISTS indproj; -- Välj vilken databas du vill använda USE indproj; -- Skapa en användare user med lösenorder pass och ge tillgång oavsett -- hostnamn. CREATE USER IF NOT EXISTS 'user'@'%' IDENTIFIED -- WITH mysql_n...
true
23e698629dc9b5710c0db60e9ea52423881a3777
SQL
hugo-inda-toledo/contru
/dev/sql/2016-07-15_2.sql
UTF-8
1,800
3.171875
3
[]
no_license
/* Navicat MySQL Data Transfer Source Server : Local Database :: MySQl Source Server Version : 50617 Source Host : localhost:3306 Source Database : ldz Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2016-07-15 17:11:00 */ SET FOREIGN_KEY_CHECK...
true
bfff97a900daad72034e638ef6159bbd8b9e69f1
SQL
hiralhp/cse-414-databases
/hw2/hw2-q8.sql
UTF-8
136
3.1875
3
[]
no_license
-- 22 rows SELECT name AS carrier, SUM(departure_delay) delay FROM Flights f JOIN Carriers c ON f.carrier_id = c.cid GROUP BY carrier;
true
c62dbe50f52c56335881156cbf789bf557be8e24
SQL
agrc/ugs-db
/scripts/createIndices.sql
UTF-8
960
3.15625
3
[]
no_license
USE [UGSWaterChemistry] CREATE INDEX DataSource_index ON Results (DataSource) CREATE INDEX ParamGroup_index ON Results (ParamGroup) CREATE INDEX Param_index ON Results (Param) CREATE INDEX SampleDate_index ON Results (SampleDate) CREATE INDEX StationId_index ON Results (StationId) CREATE INDEX StateCode_index ON Stat...
true
b8d542d4a6c9189d3330d4fa9fe7d9e203db3d38
SQL
BigDataManagement/Gestion-de-Datos
/Carga/fill_schema.sql
UTF-8
2,318
3.5625
4
[]
no_license
INSERT INTO olap.dim_time SELECT DISTINCT NULL AS date_id, r.rental_date AS rental_date, DATE(r.rental_date) AS is_date, DATE_FORMAT(r.rental_date, '%Y%M%D') AS full_date_description, DAY(r.rental_date) AS is_day, MONTH(r.rental_date) AS is_month, YEAR(r.rental_date) AS is_year, QUARTER(r.rent...
true
b1cfd6c97d98ebf520acd1ea3fbab784b8ca0a14
SQL
vjdeeds/Mini_exchange
/database-setup.sql
UTF-8
1,027
3.890625
4
[]
no_license
/* DROP SCHEMA public cascade; */ -- CREATE SCHEMA IF NOT EXISTS public; CREATE USER test; DROP DATABASE IF EXISTS test; CREATE DATABASE test; /* create company table */ CREATE TABLE IF NOT EXISTS COMPANY( companyId VARCHAR(10) PRIMARY KEY, bid INTEGER NOT NULL, budget DECIMAL(10, 3) NOT NULL ); /* crea...
true
e18e5bf6d247778861a77d0402cd2dd7c6491eb8
SQL
jezhische/SQL_learning
/serial_learning.sql
UTF-8
644
3.09375
3
[]
no_license
CREATE table if not exists public."USER" ( id serial primary key, name character varying(255) COLLATE pg_catalog."default" NOT NULL, password character varying(255) COLLATE pg_catalog."default" NOT NULL ) TABLESPACE pg_default; ALTER TABLE public."USER" OWNER to postgres; insert into "USER" ("n...
true
bc3f7c7910074ea1cfd2b64c90c6fbc19a3f652c
SQL
Miimkkaa/StationLog
/SQLQueryStationLogDB.sql
UTF-8
6,938
3.515625
4
[]
no_license
CREATE TABLE UserTable ( UserID INT IDENTITY(1,1) NOT NULL PRIMARY KEY, NameOfUser NVARCHAR(25) NOT NULL, Surname NVARCHAR(25) NOT NULL, Username NVARCHAR(50) NOT NULL, UserPassword VARCHAR(50) NOT NULL, UserType NVARCHAR(20) ); CREATE TABLE Station( StationID INT NOT NULL PRIMARY KEY, StationName NVARCHAR(...
true
bcca437184fc8b295503ca6e1e31d4887e54172e
SQL
magdziarek/GroundTruther
/Ground_Truther/database/def_tables.sql
UTF-8
1,698
3.75
4
[ "MIT" ]
permissive
/* this document contains definitions for all tables in database ground_truther */ --define tbl_personal_basic drop table if exists tbl_personal_basic; create table tbl_personal_basic (id_part int auto_increment not null primary key, email varchar(63) default null, password varchar(64), unique index uni_id(ema...
true
fe3c44b20919ca1895c76f5be60292136d447b52
SQL
efreesen/datasci_course_materials
/assignment2/part_f.sql
UTF-8
142
2.84375
3
[]
no_license
select count(*) from frequency as f join frequency as fw on fw.docid = f.docid where f.term = "transactions" and fw.term = "world";
true
d3c79cdc38c82ab52501b5feff22c7954e3d39e2
SQL
BiserHristov/SoftUni
/05. C# DataBase/01. MS SQL/05. Subqueries and JOINs/Homework_Joins/11. Min Average Salary.sql
UTF-8
650
3.8125
4
[ "MIT" ]
permissive
SELECT TOP(1) AVG(e.Salary) AS MinAverageSalary FROM Departments d JOIN Employees e ON e.DepartmentID=d.DepartmentID GROUP BY d.Name ORDER BY MinAverageSalary --Solution with DENSE_RANK(): --SELECT MinAverageSalary FROM --( --SELECT AVG(e.Salary) AS MinAverageSalary, --DENSE_RANK() OVER (ORDER BY AVG(e.Salary...
true
756a751d698203eca5313f9cf3cea3d0d3dc5576
SQL
abarciauskas-bgse/gaceta
/schema.sql
UTF-8
1,102
3.34375
3
[]
no_license
CREATE TABLE corpii ( Id serial PRIMARY KEY, Year varchar(20), TermVector varchar[] ); CREATE UNIQUE INDEX corpii_id ON corpii (Id); CREATE TABLE processed_documents ( Id serial PRIMARY KEY, CorpiiId int REFERENCES corpii (Id) ON DELETE CASCADE, Fi...
true
eeef6e4b04b38a341b24ea8e279bdcf1fbebb9c8
SQL
JorgeIvanMedina/movilita
/All/BaseDatos2.sql
UTF-8
1,516
3.734375
4
[ "MIT" ]
permissive
/*==============================================================*/ /* DBMS name: MySQL 5.0 */ /* Created on: 22/09/2017 10:44:31 */ /*==============================================================*/ drop table if exists HISTORIAL; drop tabl...
true
db1018dc26cf37d63577dab331d0e92d9452fb7e
SQL
CPI-BI/bi-repo
/BI_SCRIPTS/ADHOCS/BI_PROD_COLLECTION_MV.SQL
UTF-8
1,744
3.21875
3
[]
no_license
SET SERVEROUTPUT ON SET FEEDBACK OFF BEGIN DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------'); DBMS_OUTPUT.PUT_LINE('##Processing Materialized Views-Others##'); DBMS_OUTPUT.PUT_LINE('Dropping Materialized Views...'); END; / BEGIN process_object...
true
2fa24d3f8570b6a30371c079ca646df7db67ef4e
SQL
ekachner/SQL
/erica4.sql
UTF-8
947
4
4
[]
no_license
use employees; -- All female developers receive a 15% raise to their current salary -- ALTER TABLE `salaries` -- CHANGE COLUMN `ek_female_developer_raise` `EK_female_developer_raise` INT(6); -- UPDATE salaries AS s -- INNER JOIN employees AS e -- ON e.emp_no = s.emp_no -- INNER JOIN dept_emp AS demp --...
true
8e9e55377134d5f8a233c403e4ab9b2455de6ffd
SQL
AngelCooper/12-employeeAssignment
/database/seed.sql
UTF-8
1,462
3.015625
3
[]
no_license
USE employeesDB; INSERT INTO department (name) VALUES ("Sales"); INSERT INTO department (name) VALUES ("Engineering"); INSERT INTO department (name) VALUES ("Finance"); INSERT INTO department (name) VALUES ("Legal"); INSERT INTO role (title, salary, department_id) VALUES ("Sales Lead", 100000, 1); INSERT INTO role (t...
true
b5121b4347a9607883f6cbdb16d5d7912e8cd169
SQL
ahmednour1430464/coach-finder-backend
/prisma/migrations/20210609153511_init/migration.sql
UTF-8
1,699
3.796875
4
[]
no_license
-- CreateTable CREATE TABLE `User` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `email` VARCHAR(191) NOT NULL, `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updatedAt` DATETIME(3) NOT NULL, UNIQUE INDEX `User.email_unique`(`email`), PRIMARY KEY (`id`) ) DEFAULT CHARACTER SET utf8mb...
true