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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61e2f31945647060e88f2bf5ec10dfcd8a4743a6 | SQL | macosta08/SQL_SISTEMA_BANCARIO_ACADEMLO | /01_DDL-db_sistema_bancario.sql | UTF-8 | 1,061 | 3.734375 | 4 | [] | no_license | CREATE TABLE "Customers" (
"ID" int PRIMARY KEY,
"ID_ACCOUNT" int,
"NAME" varchar,
"PHONE" varchar,
"ADDRESS" varchar
);
CREATE TABLE "Accounts" (
"ID" int PRIMARY KEY,
"ACCOUNT" int,
"ID_CUSTOMER" int,
"ID_ACCOUNT_TYPE" int,
"ACCOUNT_BALANCE" INT
);
CREATE TABLE "Transactions_Types" (
"ID" int ... | true |
477089f3fe85eeb2357197a563cd387f83de64a5 | SQL | kilica/letag | /xoops_trust_path/modules/letag/sql/mysql.sql | UTF-8 | 526 | 3 | 3 | [] | no_license | CREATE TABLE `{prefix}_{dirname}_tag` (
`tag_id` int(11) unsigned NOT NULL auto_increment,
`tag` varchar(60) NOT NULL,
`uid` mediumint(8) unsigned NOT NULL,
`dirname` varchar(25) NOT NULL,
`dataname` varchar(25) NOT NULL,
`data_id` int(11) unsigned NOT NULL,
`posttime` int(11) unsigned NOT NULL,
PRIMAR... | true |
16e4c7de15d6a4eb615aa392c8854c129c1a329d | SQL | Fun33/99_note | /DB/SQLServer/cte_遞迴/cte_recursion.sql | BIG5 | 1,248 | 3.828125 | 4 | [] | no_license | --=================================easy
--j CTE 䭭Aw]̤jj MAXRECURISON O 100
--AUh.
with tmp(father,kid ) as
(
select itt1.Father ,itt1.Code from ITT1 where itt1.Father='a' --Abo
union all
select itt1.Father ,itt1.Code from ITT1
inner join TMP on tmp.kid =itt1.Father --AU,X
)
select * from tmp
--===Return
--a a... | true |
66196b4ac25d698d340032fa79185f81523f1ce1 | SQL | PatrycjaKarbownik/Hades-Travel | /sql/functions.sql | UTF-8 | 4,684 | 3.890625 | 4 | [] | no_license | -- bez kursora
CREATE OR REPLACE FUNCTION demand_for_coffins(CoffinType IN VARCHAR2)
RETURN VARCHAR2
IS
NumberOfBurials INTEGER;
Text VARCHAR2(11 CHAR);
BEGIN
SELECT COUNT(*) INTO NumberOfBurials
FROM BURIAL, COFFIN
WHERE BURIAL.Coffin_type = COFFIN.Coffin_type AND COFFIN.Coffin_type = CoffinType;
... | true |
392464b29ccd20b164ce4a1f48556f9f9d80167a | SQL | jemikanegara/sql-project | /sqdemo.sql | UTF-8 | 3,533 | 4.125 | 4 | [] | no_license | USE impact_byte;
/* DDL -------------------------------------------------------- */
/* CREATE */
CREATE TABLE customers (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100),
address TEXT,
age INT(3),
date_of_birth DATE,
PRIMARY KEY(id)
);
/* DROP */
DROP... | true |
83e4523b0dd6ed12b73a7a883b10a9cfc9227c70 | SQL | tDalile/gpm-vg-b | /docker-data/postgres/db-dump/gpm.sql | UTF-8 | 17,740 | 3.03125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 11.4 (Debian 11.4-1.pgdg90+1)
-- Dumped by pg_dump version 11.4 (Debian 11.4-1.pgdg90+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
S... | true |
9c467c491dfb1a87f8dfcffe16750c392942990d | SQL | FrancisBourgouin/lectures-2020-mtl-mar02 | /w5d1/db.sql | UTF-8 | 1,540 | 3.0625 | 3 | [] | no_license | DROP TABLE bottles;
DROP TABLE spirits;
CREATE TABLE bottles(
id serial PRIMARY KEY,
name TEXT NOT NULL,
age INT NOT NULL,
price FLOAT NOT NULL,
volume INT NOT NULL,
spirit_id INT NOT NULL
);
CREATE TABLE spirits(
id serial PRIMARY KEY,
name TEXT NOT NULL,
subtype TEXT NOT NULL,
desc... | true |
5c8c9bc71a0774f0f3ff1aaf3962c366fd29c50c | SQL | Mtllns/Queries-SQL | /QueriesSQLConultes.sql | UTF-8 | 2,173 | 3.828125 | 4 | [] | no_license | /* 1º consulta
Quantitat de registres de la taula de vols. */
SELECT COUNT(*) FROM flights;
/*----------------------------------------*/
/* 2º consulta
Retard promig de sortida i arribada segons l’aeroport origen.*/
SELECT Origin As Origen, AVG(ArrDelay) As Promedio_llegada, AVG(DepDelay) As Promedio_Salida
F... | true |
42d0c937a9347c00d266708b7b6bd0aff58647f4 | SQL | Michael-Pan95/Oracle-DB | /UNION COMPATIBLE NOTE.sql | UTF-8 | 507 | 3.15625 | 3 | [] | no_license | /*
test for union with same domain but different logical meaning'
CONCLUSION: the only constraint in the uion is data type, the meaning of data is not counted
*/
create table only4test(
ID number(6) primary key,
Name VARCHAR(20)
);
create table only4test2(
ID number(6),
Code VARCHAR(20)
);
INSERT Int... | true |
d4302b5b334e81f9c588913ec09966edc2751a1d | SQL | luisadrianml/sistemaNominaProject | /querys para insert y tener datos en base.sql | UTF-8 | 615 | 2.671875 | 3 | [] | no_license | insert into departamento values (01, 1, 'Recursos humanos');
insert into tipo_salario values (1, 'Mensual', 23.83);
insert into tipo_salario values (2, 'Quincenal', 11.91);
insert into tipo_salario values (3, 'Semanal', 5.5);
insert into tipo_salario values (4, 'Diario por hora', 8);
insert into cargo values (1, 'CEO... | true |
5e757ec8fb24dc81d0ee8575620280d0c5c81f6f | SQL | jerome13250/RanToolBox_SQL | /CTN_16_Create_SHO_FluxNuls_FRANCE.sql | UTF-8 | 1,604 | 3.359375 | 3 | [] | no_license | SELECT DISTINCT
t_voisines3g3g.rnc,
t_voisines3g3g.fddcell,
t_voisines3g3g.dlfrequencynumber_s,
t_voisines3g3g.localcellid_s,
t_voisines3g3g.primaryscramblingcode_s,
t_voisines3g3g.locationareacode_s,
t_voisines3g3g.umtsfddneighbouringcell,
t_voisines3g3g.dlfrequencynumber_v,
t_voisines3g3g.l... | true |
e3fbee18b090c6c41a92222811c64759dcd5273a | SQL | pedroi77/resergol1.1 | /dataBase/SPs/SP_getComplejo.sql | UTF-8 | 1,178 | 3.984375 | 4 | [] | no_license | USE resergol;
DROP PROCEDURE IF EXISTS SP_getComplejo;
DELIMITER //
CREATE PROCEDURE SP_getComplejo(
pIdComplejo INT(11)
)
BEGIN
SELECT CO.IdDuenio, CO.IdComplejo, CO.Nombre as nombreComplejo, P.Nombre AS Provincia, L.Nombre as Localidad,
CD.Calle, CD.Altura, CO.nroTelefono, CO.nroCelular, CO.PorcentajeSeña a... | true |
15f00de08b144cfb66fb2a51401812f6c2dfc2c3 | SQL | rusli-nasir/inventory_app | /db_inventori.sql | UTF-8 | 13,037 | 2.984375 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 50611
Source Host : 127.0.0.1:3306
Source Schema : db_inventori
Target Server Type : MySQL
Target Server Version : 50611
File Encoding : 65001
Date: 30/12/2018 2... | true |
0cc4d52303fdaafd3ddbe1f85eab6d40f13bce68 | SQL | julienpz/deconnaissance | /bd_deconnaissance.sql | UTF-8 | 17,202 | 3.1875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.6
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : lun. 11 déc. 2017 à 09:57
-- Version du serveur : 5.5.57-0+deb8u1
-- Version de PHP : 5.6.30-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
8afff0bbea57a35042842da4348be623ea8b9fcc | SQL | bobby-brice/BootcampX | /1_queries/total_students_in_cohort.sql | UTF-8 | 143 | 3.46875 | 3 | [] | no_license | /**
Select the total number of students who were in the first 3 cohorts.
**/
SELECT COUNT(id)
FROM students
WHERE cohort_id
BETWEEN 1 AND 3; | true |
b769a493b795b7e2a04fa5706b643bdbd857f356 | SQL | Jse10101/ei1027 | /src/sql/reinicio.sql | UTF-8 | 14,840 | 3.546875 | 4 | [] | no_license |
DROP TABLE isPayedBy;
DROP TABLE Request;
DROP TABLE Contract;
DROP TABLE Invoice;
DROP TABLE Availability;
DROP TABLE Company;
DROP TABLE Elderly;
DROP TABLE SocialWorker;
DROP TABLE Volunteer;
DROP TABLE Login;
-- T A B L A V O L U N T A R I O
CREATE TABLE Volunteer (
-- Atributos
name VARCHAR(... | true |
18a9dbad8be09461a5746c6d1aae30db5b06dd17 | SQL | MichalWisniowski98/inz | /restaurantManager/database/queries/CreateMealsDbScripts.sql | UTF-8 | 3,012 | 3.375 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Tue Sep 28 20:29:55 2021
-- 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 |
cd2d3edc7026161924f9d4734c1a3665b831a926 | SQL | DalatCoder/CSDL-1 | /Lab02/Lab02_QLSX.sql | UTF-8 | 8,357 | 3.5 | 4 | [] | no_license | ------------------------------------------------
/* Học phần: Cơ sở dữ liệu
Ngày: 19/04/2020
Người thực hiện: Nguyễn Trọng Hiếu
MSSV: 1812756
Lớp: CTK42
*/
------------------------------------------------
CREATE DATABASE Lab02_QuanLySanXuat;
USE Lab02_QuanLySanXuat;
CREATE TABLE ToSanXuat
(
id CHAR(4) ... | true |
97f31a884e9c5b90178772ef6b6164f2e2b34546 | SQL | JoshuaRitz/PoliceDepartmentDB | /createDB.sql | UTF-8 | 3,782 | 3.640625 | 4 | [] | no_license | drop schema if exists policeorganizationdb;
create schema policeorganizationdb;
use policeorganizationdb;
drop table if exists OFFICERS;
drop table if exists DEPARTMENT;
drop table if exists EQUIPMENT;
drop table if exists VEHICLES;
drop table if exists SUSPECTS;
drop table if exists CASES;
drop table if exists EVIDE... | true |
c21e28a0783e65f11264cb74f8a98f04860e705f | SQL | XingXing2019/LeetCode | /Database/LeetCode 1623 - AllValidTripletsThatCanRepresentACountry/AllValidTripletsThatCanRepresentACountry_SQLServer.sql | UTF-8 | 362 | 3.734375 | 4 | [] | no_license | SELECT a.student_name AS member_A, b.student_name AS member_B, c.student_name AS member_C
FROM SchoolA a CROSS JOIN SchoolB b CROSS JOIN SchoolC c
WHERE a.student_id <> b.student_id AND a.student_id <> c.student_id AND b.student_id <> c.student_id
AND a.student_name <> b.student_name AND a.student_name <> c.student_n... | true |
394525114c0601c7c8ce3e5c61426d2cb0e98635 | SQL | anjali13942/Training | /test_a.sql | UTF-8 | 1,084 | 3.140625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS test.a (
user_id integer NOT NULL,
username character varying DEFAULT 'aaa'::character varying,
password character varying ,
id integer NOT NULL,
id2 integer NOT NULL
);
CREATE SEQUENCE IF NOT EXISTS test.a_id_seq
AS integer;
CREATE SEQUENCE IF NOT EXISTS test.a_id_seq
AS integer;
ALTER TA... | true |
b3c1e9c1081d984468ddf829119ffe68152e82ee | SQL | AgataKowal/bazy_danych | /Zestaw 02/pyt-07.sql | WINDOWS-1250 | 1,373 | 3.71875 | 4 | [] | no_license | -- zapytania zagniedone (zagniedenia nieskorelowane)
-- vs. zczenia:
-- sprawd jacy klienci zoyli zamwienia
-- rozwizanie ze zczeniem
SELECT imie, nazwisko
FROM klient K, zamowienie Z
WHERE K.nr=Z.klient_nr
GROUP BY K.nr, imie, nazwisko
;
-- rozwizanie z zagniedeniem
SELECT imie, nazwisko FROM klie... | true |
0e367d3c1b66e239cc643800bca9f6846952ff7e | SQL | superyang713/SQL_Learn | /Coursera_UC_Davis_SQL_for_Data_Science/week_3_subqueries_and_joins/subquery.sql | UTF-8 | 795 | 4.3125 | 4 | [] | no_license | /*
For multiple table in a db, use subquery to connect them.
Always perform the innermost select portion first
DBMS is performing two operations.
1. Getting the order numbers for the product selected.
2. Adding that to the where clause and processing the overall select
statement.
There is no limit to the ... | true |
d06b1ab2eea63d5423c2e47b36570243e8c29ee3 | SQL | eltercera/WINERY | /sql/insert-region-argentina.sql | UTF-8 | 3,399 | 2.921875 | 3 | [] | no_license | select pai_id as id_pais from pais where upper(pai_nombre) = 'ARGENTINA' \gset
\lo_import ../imagenes/cuyo.gif
insert into region (reg_nombre,reg_ano_creacion,reg_latitud,reg_descripcion_general,rep_mapa,fk_region) values
(
'Cuyo',
null,
medida('°',31,'Latitud sur'),
des_gen_region(),
:LASTOID,
null
)
... | true |
13a7efbff0551ecad096cb577f65f732dc34a50b | SQL | douit/cqes_dev | /重庆二师_Dev/dw_mpp/table/fdm/edu_hb_zxxsyslb.sql | UTF-8 | 951 | 2.625 | 3 | [] | no_license | /*
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: wu.yabing@h3c.com
# COMPANY: h3c.bigdata
# VERSION: 1.0
# CREATED: 2017/08/07
# REVIEWER:
# REVISION: ---
*/
-- ----------------------------
-- Table structure for edu_hb_zxxsysl... | true |
4bb3dc86572db6ef6f7f42d35e1eb49e9d60643a | SQL | jonamuen/sql-reduce | /test/sqlsmith/sqlite/225.sql | UTF-8 | 1,078 | 3.546875 | 4 | [
"MIT"
] | permissive | select
cast(coalesce(subq_0.c9,
subq_0.c9) as VARCHAR(16)) as c0,
10 as c1,
subq_0.c1 as c2
from
(select
ref_0.id as c0,
ref_0.name as c1,
ref_0.name as c2,
ref_0.id as c3,
ref_0.id as c4,
ref_0.id as c5,
(select name from main.t0 limit 1 ... | true |
24f922c0f3cbe292871b8814abbd17b4e9a0a853 | SQL | seakmengc/php_system | /system.sql | UTF-8 | 7,749 | 3.4375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 01, 2020 at 03:59 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 SET @OL... | true |
b2a99e6cbdf0ab4a9a8a9beb50444366e346cba6 | SQL | FationSH/EvolutionChartExporter | /SCHEMA_EVO_2019/aimeos__aimeos-typo3/schemata/1480432130.sql | UTF-8 | 1,323 | 3.109375 | 3 | [
"MIT"
] | permissive | # Extend fe_users by fields required by Aimeos TYPO3 extension like sr_feuser_register does
CREATE TABLE fe_users (
static_info_country char(3) DEFAULT '' NOT NULL,
zone varchar(45) DEFAULT '' NOT NULL,
language char(2) DEFAULT '' NOT NULL,
gender int(11) unsigned DEFAULT '99' NOT NULL,
name varcha... | true |
60f5aa6a29260a736221bfc7477dc4ec19e8d90f | SQL | siminitchi/tekwill | /lesson8/SQL~2.sql | UTF-8 | 406 | 2.890625 | 3 | [] | no_license | select * from job_history
order by 1;
--6-a)Afisati employee_id, job_id si cite luni a lucrat persoana respectiva in acea functie.
--Ordonati datele la alegere astfel incit data angajatul are mai multe inregistrari sa le vizualizati impreuna.
--6- b)Verificati dataca sunt persoane care si-au schimbat jobul cel putin d... | true |
fbadd0eec636537db0fc35652a4ac645d6a06f5d | SQL | andersonflorez/Proyecto_Salud | /Base de datos/BASE DE DATOS (SOLO ADMIN)/PROCEDIMIENTOS/SENTENCIAS DROP PROCEDURE.sql | UTF-8 | 17,576 | 2.515625 | 3 | [] | no_license | -- LAS SIGUIENTES SENTENCIAS ELIMINAN TODOS LOS PROCEDIMIENTOS ALMACENADOS MODIFICADOS DE LA BD:
USE `bd_proyecto_salud`;
DROP PROCEDURE IF EXISTS spDetalleKit;
DROP PROCEDURE IF EXISTS spRegistrarEnteexterno;
DROP PROCEDURE IF EXISTS spRegistrarTipoevento;
DROP PROCEDURE IF EXISTS spRegistrarVistoChat;
DROP PROCEDURE ... | true |
b79c926cb21aaebac9c65a81667dffab23370a48 | SQL | Njupt-Sast-Network/NICP-BE | /cxb_dev.sql | UTF-8 | 1,574 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version phpStudy 2014
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2016 年 04 月 23 日 00:11
-- 服务器版本: 5.5.40
-- PHP 版本: 5.4.33
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_CHARA... | true |
ae36a3c9d56ac0c1d142910a05c3b500785b08a7 | SQL | yustika-apz/Sistem-Peminjaman-Ruangan | /Dataase/peminjaman_ruangan (1).sql | UTF-8 | 10,428 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 18, 2020 at 10:08 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
403d59cd48eaeedbcab91e08d78f4aabf91302de | SQL | kanzagilani/flp_v2 | /logistics.sql | UTF-8 | 3,101 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 07, 2014 at 08:34 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
89bc66c3bbc8f629c14336fbbc80e6cca63bb575 | SQL | yinifeng/hobart-security | /hobart-springboot-security/src/main/resources/ddl.sql | UTF-8 | 8,030 | 3.703125 | 4 | [] | no_license | /*!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 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101... | true |
13c83b1c4f54153e6568e98013a87ec8b140b59e | SQL | cuixueqin/Balmorel | /base/addons/maxfor3fuels/bb4/maxfor3fuels_eqndecdef.inc | UTF-8 | 902 | 2.796875 | 3 | [
"ISC"
] | permissive | Equations
QMAXFOR3FUELS_GMAXC3F(Y,C,FFF,IFFFALIAS,IFFFALIAS2) 'Maximum fuel usage per country for a shared max for three fuels'
;
QMAXFOR3FUELS_GMAXC3F(IY411,C,FFF,IFFFALIAS,IFFFALIAS2)$MAXFOR3FUELS_GMAX3F(IY411,C,FFF,IFFFALIAS,IFFFALIAS2)..
MAXFOR3FUELS_GMAX3F(IY411,C,FFF,IFFFALIAS,IFFFALIAS2)
+ VMAX... | true |
73fd91e244ba7ef0a444db32aed90f13ed52852a | SQL | xsepa/basic | /Dump20190226/basic_test_order.sql | UTF-8 | 3,009 | 3.1875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: basic_test
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
d4815fb495573a401a4a1dcb77371555e57a1f69 | SQL | BielinskiLukasz/sqlTasks | /RBD/c06/join.sql | UTF-8 | 3,518 | 4.3125 | 4 | [] | no_license | -- SQL - Złączenia
-- 1. Połącz dane z tabel EMP i DEPT przy pomocy warunku złączenia w WHERE.
SELECT *
FROM emp e, dept d
WHERE e.deptno = d.deptno;
-- 2. Połącz dane z tabel EMP i DEPT przy pomocy INNER JOIN.
SELECT *
FROM emp e
JOIN dept d ON e.deptno = d.deptno;
-- 3. Wybierz nazwiska oraz nazwy departamentów w... | true |
c7b1033e2a8fb267f199dbd495f22e0223e2d834 | SQL | lcouellan/ReseauSocial | /script2.sql | UTF-8 | 7,602 | 3.859375 | 4 | [] | no_license | DROP DATABASE IF EXISTS reseau_social;
CREATE DATABASE IF NOT EXISTS reseau_social;
USE reseau_social;
# -----------------------------------------------------------------------------
# TABLE : UTILISATEUR
# -----------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS ... | true |
9e1afa6d933aa5809964a678da1b5bcb997c1124 | SQL | henriqueyda/ecommerce_sql | /product_category.sql | UTF-8 | 242 | 2.96875 | 3 | [] | no_license | CREATE TABLE tblProductCategory(
Id_Product_Category INT IDENTITY(1,1) PRIMARY KEY,
Product_Category_Name VARCHAR(500)
)
INSERT INTO tblProductCategory(
Product_Category_Name
)(
SELECT DISTINCT product_category_name FROM tblAuxProducts
) | true |
bcdc10182351a5650392e2311f2f378d9f3fa154 | SQL | domainFang/seckill | /src/main/sql/seckill.sql | UTF-8 | 3,082 | 3.203125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50719
Source Host : localhost:3306
Source Database : seckill
Target Server Type : MYSQL
Target Server Version : 50719
File Encoding : 65001
Date: 2018-08-15 13:27:17
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
a1fddbe4532e4e5a9878034fa1161d9df243e6c6 | SQL | jerome13250/RanToolBox_SQL | /NOKIA_Update_LCID_fromTopoALU.sql | UTF-8 | 1,068 | 3.375 | 3 | [] | no_license | --creation table temporaire des lcid a remplir:
DROP TABLE IF EXISTS tmp_topologie3gnokia_lcid_update;
CREATE TABLE tmp_topologie3gnokia_lcid_update AS
SELECT
t_topologie3g_nokia."WCEL_managedObject_distName",
t_topologie3g_nokia.name,
t_topologie3g_nokia."managedObject_WCEL",
t_topologie3g.fddcell,
t_t... | true |
d66129cc571d3195c147ccd8dbafbafe8ffb6728 | SQL | anhstudios/swganh | /data/sql/galaxy/scripts/chat_rooms.sql | UTF-8 | 719 | 3 | 3 | [
"MIT"
] | permissive |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;
DROP TABLE IF EXISTS `chat_rooms`;
CREATE TABLE `chat_rooms` (
`room_id` INT(10) NOT NULL auto_increment,
`is_private` TINYINT(1) UNSIGNED NOT NULL,
`is_muted` TINYINT(1) UNSIGNED NOT... | true |
141ea082011246b574133c8e0951a75347a2c9e4 | SQL | kellerd/Platypus | /Files/114_MILESTONE_PROGRESS_TRACKER.SQL | UTF-8 | 6,932 | 4.03125 | 4 | [] | no_license |
CREATE TABLE AH107_HRSR_PROGRESS_TRACKER
(
HRSR_PROGRESS_TRACKER_ID NUMBER NOT NULL ,
HRSR_REQUEST_CD VARCHAR2(20) NOT NULL ,
MILESTONE_CD VARCHAR2(3) NOT NULL ,
DATE_MILESTONE_MET_DTE DATE NOT NULL ,
DATE_CREATED_DTE DATE NULL ,
DATE_LAST_UPDATE_DTE DATE NULL ,
USER_LAST_U... | true |
571a100a3891d81b1d52f75df94d79b9542f009c | SQL | aa-dhaar/virtual-data-room | /API/db/table.sql | UTF-8 | 998 | 3.140625 | 3 | [] | no_license | CREATE TABLE FIU(
ID VARCHAR PRIMARY KEY NOT NULL,
NAME VARCHAR NOT NULL
);
CREATE TYPE FUNCTION_STATE AS ENUM('PENDING', 'ACTIVE', 'INACTIVE', 'FAILED');
CREATE TABLE FUNCTIONS(
ID VARCHAR PRIMARY KEY NOT NULL,
FIU_ID VARCHAR NOT NULL,
FUNCTION_NAME VARCHAR NOT NULL,
FUNCTION_DESCRIPTION VARCHAR,... | true |
21e2b71183b1ad515926c424a176343571d83dc4 | SQL | juny0192/sql_design | /Soccer League.sql | UTF-8 | 1,489 | 3.640625 | 4 | [] | no_license | CREATE TABLE `team` (
`id` int PRIMARY KEY,
`name` text NOT NULL,
`players_id` ref
);
CREATE TABLE `players` (
`id` int PRIMARY KEY,
`name` text,
`main_position` text,
`current_team_id` ref
);
CREATE TABLE `referees` (
`id` int PRIMARY KEY,
`name` text
);
CREATE TABLE `matches` (
`id` int PRIMARY... | true |
3f68dd6dee2bef9a58293b79b2a0b418c195bf6f | SQL | maki-home/moneygr2 | /src/main/resources/db/migration/V1__create-schema.sql | UTF-8 | 1,224 | 3.640625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS parent_outcome_category (
parent_category_id INTEGER NOT NULL,
parent_category_name VARCHAR(255) NOT NULL,
PRIMARY KEY (parent_category_id)
)
ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS outcome_category (
category_id INTEGER NOT NULL,
category_name VARCHAR... | true |
c9708a9d1c8664c86d72891d35c2a6e520c58d1e | SQL | caioeverest/transactions-api | /basic_ops.sql | UTF-8 | 496 | 2.5625 | 3 | [] | no_license | create table operations(operation_type_id serial not null constraint operations_pkey primary key, description text not null);
alter table operations owner to admin;
insert into operations (operation_type_id, description) values (1, 'COMPRA A VISTA');
insert into operations (operation_type_id, description) values (2, 'C... | true |
fa311cfd6953a0dcece1edb32cfcc3c5595b0367 | SQL | Miguelp-rez/PharmacyOnline | /main.sql | UTF-8 | 642 | 2.859375 | 3 | [] | no_license |
prompt Ingresa la contraseña del usuario sys
connect sys as sysdba
drop user ps_proy_admin cascade;
drop user ps_proy_invitado cascade;
drop role rol_admin;
drop role rol_invitado;
@@s-01-usuarios.sql
@@s-02-entidades.sql
@@s-03-tablas-temporales.sql
@@s-04-tablas-externas.sql
@@s-05-secuencias.sql
@@s-06-indices... | true |
0381ce3d13036447f7aeb5cfead4a5722b26cb76 | SQL | renjieliu/leetcode | /database/1050.SQL | UTF-8 | 2,077 | 4.15625 | 4 | [] | no_license | /*
+-------------+---------+
| Column Name | Type |
+-------------+---------+
| actor_id | int |
| director_id | int |
| timestamp | int |
+-------------+---------+
timestamp is the primary key column for this table.
Write a SQL query for a report that provides the pairs (actor_id, d... | true |
333cf49a470939eaa49cf0640688a9e5a55662ff | SQL | loveactualry/TIL | /pract.sql | UTF-8 | 11,844 | 4.21875 | 4 | [
"MIT"
] | permissive | CREATE DATABASE test;
USE test;
SELECT DATABASE();
CREATE TABLE USER3(
user_id INT,
name VARCHAR(20),
email VARCHAR(30),
age INT(3),
rdate DATE
)
CREATE TABLE user2(
user_id INT PRIMARY KEY AUTO_INCREMENT,
name Varchar(20) NOT NULL,
email Varchar(30) UNIQUE NOT NULL,
age INT(3) DEFAULT '30',
rdate TIMESTAMP
)
... | true |
9f9ee92dc96e57e433733bfb48f0152149389f79 | SQL | xxgail/LeetCode-PHP | /MySQL/197.sql | UTF-8 | 1,494 | 4.40625 | 4 | [] | no_license | CREATE TABLE `Weather`(
`id` int(11) AUTO_INCREMENT,
`recordDate` date,
`temperature` int
);
/**
表 Weather
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| id | int |
| recordDate | date |
| temperature | int |
+---------------+---------+
id... | true |
ab88004b630388d697140a1cec4a6b444d1fe43b | SQL | hendradedis/resfull_api | /db/dbtheman.sql | UTF-8 | 4,398 | 3.078125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 30, 2018 at 04:01 PM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
2db761e8e65e82c4563aa38b10a3fb35b20fdfcd | SQL | JakeOh/201908_itw_bdml11 | /lab-oracle/ex10.sql | UTF-8 | 550 | 3.84375 | 4 | [] | no_license | -- hr 계정
-- 부서별 급여 최소값
select min(salary) from employees
group by department_id;
select employee_id, first_name, salary, department_id
from employees
where salary in (
select min(salary) from employees
group by department_id
);
select department_id, min(salary)
from employees
group by department... | true |
4f65184c39bc1693a7b7e31721da84d228af8a65 | SQL | marioandre01/micro_services_shopping_api_spring_boot | /shopping_api/src/main/resources/db/migration/V1__create_shop_table.sql | UTF-8 | 333 | 3.296875 | 3 | [
"MIT"
] | permissive | create schema if not exists shopping;
create table shopping.shop (
id bigserial primary key,
user_identifier varchar(100) not null,
date timestamp not null,
total float not null
);
create table shopping.item (
shop_id bigserial REFERENCES shopping.shop(id),
product_identifier varchar(100) not null,
price float... | true |
5e01ab36cc120e2bcd6cde12ad18102c3cf77a35 | SQL | Nosferya/Fete_du_Numerique | /BDD/fete_du_numerique.sql | UTF-8 | 9,586 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : mer. 31 oct. 2018 à 13:09
-- Version du serveur : 10.1.31-MariaDB
-- Version de PHP : 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
9eda29aef7c7bb7e2d872a954a752ccb55a42cdb | SQL | davideverett89/sql_workshop | /queries/book2chapter4(2).sql | UTF-8 | 1,500 | 4.59375 | 5 | [] | no_license | -- Produce a report that determines the most popular vehicle model that is leased.
SELECT
vmd.name AS "Model",
st.name AS "Sales Type",
Count (s.sale_id) AS "Number of Sales"
FROM vehiclemodels vmd
JOIN vehicletypes vt ON vt.vehicle_model_id = vmd.vehicle_model_id
JOIN vehicles v ON vt.vehicle_type_id = v.vehicle_t... | true |
eede616a8e615c670a3a21aad8fbf16f114048a0 | SQL | Cancelkam/doingsdone | /schema.sql | UTF-8 | 1,590 | 3.734375 | 4 | [] | no_license |
CREATE DATABASE IF NOT EXISTS `doingsdone`;
USE `doingsdone`;
CREATE TABLE IF NOT EXISTS `projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`project_name` varchar(50) DEFAULT NULL,
`user_id` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `name` (`project_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CH... | true |
051ac6ad5a2d4065cbd53d72cf505e5d08fead21 | SQL | lcarlp/uvcnp | /client_list.sql | UTF-8 | 1,021 | 3.78125 | 4 | [] | no_license | -- List clients from Lyme in Alphabetical order.
-- To use for other towns, change town name, but, importantly,
-- make sure you use the correct export table, which is
-- referenced multiple times.
select client.last_name
, client.first_name
, client.record_id
, case status.client_redcap_status
... | true |
917a30d7beb952972f44dffadcd70e64b49242be | SQL | creanero/locus | /SQL_queries/find all sources in fields near target 1.sql | UTF-8 | 1,003 | 2.59375 | 3 | [] | no_license |
select count(*)
FROM PhotoObj AS p
WHERE
p.run = 2964 and p.rerun = 40 and p.camcol = 1 and p.field = 275
or p.run = 2964 and p.rerun = 40 and p.camcol = 1 and p.field = 278
or p.run = 3059 and p.rerun = 42 and p.camcol = 1 and p.field = 105
or p.run = 3059 and p.rerun = 42 and p.camcol = 1 and p.field = 1... | true |
d03a54caa8d184fc1751d8422e2bc147b3989788 | SQL | radtek/abs3 | /sql/mmfo/bars/View/v_nbur_detail_protocols.sql | UTF-8 | 2,402 | 3.15625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_NBUR_DETAIL_PROTOCOLS.sql =========**
PROMPT =====================================================================================
PROMPT *** Create view V_NB... | true |
5ec79a8017605d16357395e77b1646474fbf4fcd | SQL | Scergo/CactusDB | /Tables/game_event_prerequisite.sql | UTF-8 | 804 | 2.578125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : Pridefire
Source Server Version : 50500
Source Host : localhost:3306
Source Database : world
Target Server Type : MYSQL
Target Server Version : 50500
File Encoding : 65001
Date: 2010-12-09 11:35:28
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
48772ab40413e5fb7b1c5596b56d5663b13977e1 | SQL | osho-agyeya/Interview-questions | /Coding/bin/interviewbit/Movie_Character.sql | UTF-8 | 213 | 3.234375 | 3 | [] | no_license | SELECT concat(director_first_name,director_last_name) as director_name,
movie_title
FROM directors
NATURAL JOIN movies_directors
NATURAL JOIN movies
NATURAL JOIN movies_cast
WHERE movies_cast.role = 'SeanMaguire'; | true |
c3653e2578d126a76798bce72a63c893344daa4a | SQL | piszewc/python-deep-learning-data-science | /T-SQL/Exam 70-761/Tips.sql | UTF-8 | 37,848 | 4.8125 | 5 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- 1. SQL Query for Retrieving Tables
-- This query can be run to retrieve the list of tables present in a database where the database is “My_Schema”.
-- With the SELECT command, users can define the columns that they want to get in the query output. This command is also useful to get which column users want to see ... | true |
6b4071502b9d93951a5dac400937d6e851648e22 | SQL | joshgagnon/document-signer | /migrations/1511128451_document_set_meta.sql | UTF-8 | 400 | 3.15625 | 3 | [] | no_license | ALTER TABLE document_meta DROP CONSTRAINT document_meta_document_id_fk;
ALTER TABLE document_meta DROP COLUMN document_id;
ALTER TABLE document_meta ADD COLUMN document_set_id UUID;
ALTER TABLE document_meta ADD CONSTRAINT document_meta_document_set_id_fk FOREIGN KEY (document_set_id)
REFERENCES document_sets (... | true |
b2e0fce0dab6e8a690b1ac7862f9b1d2138d323e | SQL | zakariarony/survey-system | /sql/survey .sql | UTF-8 | 10,863 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 03, 2014 at 05:58 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
4e6a3eb59d672efd8bd655ac03c508bbe7bd33f2 | SQL | dbalinux237/OraclePerfSurvivalGuide | /Ch16/ash_latch.sql | UTF-8 | 1,681 | 3.78125 | 4 | [] | no_license | rem ***********************************************************
rem
rem File: ash_latch.sql
rem Description: Latch statistics from Active Session History (ASH)
rem
rem From 'Oracle Performance Survival Guide' by Guy Harrison
rem Chapter 16 Page 497
rem ISBN: 978-0137011957
rem See www.guyharrison.net f... | true |
4fd23a5b3f1de42c6d2ae6a5b2e97f201a90f065 | SQL | wf-oadenaike/TestProject | /TestDBProject/Compliance/Tables/StopListEvents.sql | UTF-8 | 766 | 2.5625 | 3 | [] | no_license | CREATE TABLE [Compliance].[StopListEvents] (
[StopListEventId] INT IDENTITY (1, 1) NOT NULL,
[StopListReasonId] INT NOT NULL,
[EventDetails] VARCHAR (MAX) NULL,
[StopListStatusId] SMALLINT NOT NULL,
[EventDate] DATETIME ... | true |
30ee4597f1890fddf231182d8d0d15f677c09c4c | SQL | PriyatamG/Hangman | /database.sql | UTF-8 | 3,288 | 2.890625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: Hangman
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
f6d66a1a0d6ba8befa2305ff471ad3d757641992 | SQL | p9madhavi/Madhavi | /SQL/SelectFile.sql | UTF-8 | 911 | 3.3125 | 3 | [] | no_license |
-------------------LESSON -1 ( SELECT STATEMENTS ONLY ) ---------------------
SELECT last_Name,job_id,Salary AS sal
FROM EMPLOYEES
SELECT *
FROM JOB_HISTORY
SELECT *
FROM DEPARTMENTS
SELECT MANAGER_ID,DEPARTMENT_ID,FIRST_NAME
FROM EMPLOYEES
SELECT FIRST_NAME,SALARY*5 AS SAL
FROM EMPLOYEES
SELECT DEPARTMENT_ID,... | true |
54f3977741950a188762163590afe7c5178551a9 | SQL | deluxturtle/cli-database-project | /sql_setup/deliverable_3_group_10.sql | UTF-8 | 5,274 | 3.828125 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS `password_manager`;
USE `password_manager`;
-- Queries that create schema tables--
CREATE TABLE `user` (
`username` varchar(75) NOT NULL,
`master_password` varchar(120) NOT NULL,
PRIMARY KEY (`username`)
);
CREATE TABLE `secure_note` (
`secure_note_name` varchar(50) NOT NULL,
`... | true |
9963b02ed70440a93fd292b61d93b9c087a437f9 | SQL | varrhythm/Taxi-Fare-Reimbursement | /database tables(sql codes)/ROUTE.sql | UTF-8 | 445 | 2.734375 | 3 | [] | no_license | CREATE TABLE ROUTE
(
id number PRIMARY KEY,
train_id int references TRAIN_SERVICE(train_id),
station_id number references STATION(id),
arrival_time number,
departure_time number
);
INSERT INTO ROUTE VALUES('1','1337','1','13.00','18.00');
INSERT INTO ROUTE VALUES('2','1338','2','15.00','20.00');
INSERT INTO R... | true |
0fa134d88287e433f5715c78f76cfcc81a4169a6 | SQL | DennisCheung/nxft | /dbscript/fxp/dbms/tables/09_帐户/2000010_p_coupon_type_券类型表.sql | GB18030 | 2,697 | 3.21875 | 3 | [] | no_license | --
-- ȯͱ
--
--
-- v1.0 2016.08.30
-- authorwing
--
-- ˵
--
--
-- ʷ
--
--
-- Drop Table fxp.p_coupon_type ;
Create Table fxp.p_coupon_type (
-- +-----------------------------+--------------+-----------+
fcoupon_type_id varchar2(32) not null, -- ȯid
fcoupon_type_name varchar2(40) ... | true |
44716d1ec9aadf55437c164958d938a7b79c471c | SQL | ppedvAG/SQL-VC-Programmierung-ppedv | /0005_Indizes.sql | ISO-8859-1 | 6,951 | 3.8125 | 4 | [] | no_license | /*
Heap
CL Index = tabelle
NON CL IX
------------------------------------------
eindeutiger Index PK --wertvoller Hinweis fr SQL
zusammengesetzter IX --mehr Spalten im where... max 16 Spalten
IX mit eingeschlossenen Spalten ..Select ..ca 1023 Spalten ... max 30000
gefilterter IX ..lohnt sicht, wenn sich die Ebene r... | true |
1d767745edeca9998b70da99acc2149a22df27ac | SQL | SuspectCat/day-076-- | /test.sql | UTF-8 | 169 | 3.25 | 3 | [] | no_license | SELECT MAX(score) FROM score GROUP BY s_id
SELECT * FROM secoe as s, (SELECT 最高分 FROM score GROUP BY s_id) as tb, where sstudent = tb.student, s.score = tb.score, | true |
09783a71c7946e886578323d7efaeaa6fbe5309c | SQL | ricardorohde/scorporativo | /scorporativo.sql | UTF-8 | 12,148 | 2.53125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2016 at 12:04 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
7455248ecac6b338a0a72946a6ff6086a52cb52f | SQL | cole-robertson/DatabaseProject | /SQL Queries/StudentClass/DeleteStudentClass.sql | UTF-8 | 192 | 2.734375 | 3 | [] | no_license | CREATE PROCEDURE [Project].[DeleteStudentClass]
(
@StudentId INT,
@ClassId INT
)
AS
DELETE FROM StudentClass
WHERE StudentId = @StudentId
AND ClassId = @ClassId | true |
da112281876aa60d5eb8a6d0e6badce7cc130802 | SQL | lovexqh/sns | /apps/society/Appinfo/install.sql | UTF-8 | 12,669 | 3.546875 | 4 | [] | no_license | DROP TABLE IF EXISTS `ts_blog_link`;
CREATE TABLE `ts_blog_link` (
`id` int(11) NOT NULL AUTO_INCREMENT ,
`uid` int(11) NULL DEFAULT NULL ,
`blogid` int(11) NULL DEFAULT NULL ,
`bjid` int(11) NULL DEFAULT NULL ,
`zyid` int(11) NULL DEFAULT NULL ,
`yxid` int(11) NULL DEFAULT NULL ,
`nj` int(11) NULL DEFAU... | true |
5f8c2ee39f408005a48c446453e4d1f43ae36a06 | SQL | vishnuprasadedathodi/Timesheet | /database.sql | UTF-8 | 1,456 | 3.5625 | 4 | [] | no_license | create database Employee_Directory;
use Employee_Directory;
create table admin(username varchar(30),password varchar(30),primary key(username));
insert into admin values("admin","admin123");
select * from admin;
create table employee(id integer auto_increment, name varchar(30),age integer,gender varchar(15),designatio... | true |
30b9e6a08053e9f9ce30e91046c33d95d53cb4b6 | SQL | RealImage/QLedger | /migrations/postgres/20170607015_add_constraint_lines_txn_fkey.up.sql | UTF-8 | 114 | 2.875 | 3 | [
"MIT"
] | permissive | ALTER TABLE ONLY lines
ADD CONSTRAINT lines_txn_fkey FOREIGN KEY (transaction_id) REFERENCES transactions(id); | true |
45df8806cd098e923e1012199c5f61776127f516 | SQL | Code-7-Classroom/weeklychallenges2020-E972630a | /MySQLWeek17/veryeasy.sql | UTF-8 | 545 | 3.34375 | 3 | [] | no_license | DROP DATABASE IF EXISTS veryEasyChallenge;
CREATE DATABASE veryEasyChallenge;
USE veryEasyChallenge;
CREATE TABLE carList (
CarID int AUTO_INCREMENT,
carMake varchar(255),
carModel varchar(255),
carYear int (30),
PRIMARY KEY(CarID));
INSERT INTO carList (carMake, carModel, carYear)
VALUES("Hyundai", "Sonota", 201... | true |
e1cd6867e856a8bf2d502ff25cf1c216655471b2 | SQL | blakeward05/SQL-Queries | /Assessment/MAP/MAP RIT Score by Grade.sql | UTF-8 | 1,406 | 4.34375 | 4 | [] | no_license | SELECT
saa.school_code,
sd.local_school_year,
tsc.test_admin_period,
tst.test_subject,
tsc.test_student_grade,
count(case when tsc.test_primary_result_code in (1,2) then tsc.student_key else null end) as on_target ,
count(tsc.student_key) as ett,
round( count(case when tsc.test_primary_result_code in (1,2) then... | true |
d8be0e01420bed2432203984ee839b51dbef4a92 | SQL | Carmen-LU/carmen-lu.github.io | /com5940-2020/assignment5/album.sql | UTF-8 | 10,057 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 24, 2020 at 03:14 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
f82dc3c8876a8be51041eac528f8b151ab5326bd | SQL | luizfelipe94/psadministradora | /docs/estrutura banco de dados.sql | UTF-8 | 1,865 | 3.453125 | 3 | [] | no_license | create database uberdatamanager;
use uberdatamanager;
CREATE TABLE perfil (
idPerfil int primary key auto_increment,
nome varchar(64) not null,
cpf varchar(20) not null unique,
rg varchar(20) not null unique,
cnh varchar(30) unique,
email varchar(128) not null unique,
id_Veiculo int,
fo... | true |
b7230b60f2b00ca3065c72b0ea3831fe265d9806 | SQL | deDwarf/MyUTM | /dbdataaccess/src/main/resources/select_schedule_for_date.sql | UTF-8 | 1,376 | 4.28125 | 4 | [] | no_license | select
'regular' as class_type, sch.schedule_entry_id
, case when scc.entry_id is not null then 1 else 0 end as cancelled_flg
, c.date_key as `date`, sch.class_start_time, sch.class_end_time, sch.class_number
, classroom_name
, group_number, subgroup
, teacher_first_name, teacher_second_name, teacher_middle_name... | true |
31ed59d92f3a6b09e3ec83c8cd91ab1afc754408 | SQL | doodlecoge/blogjs | /db.sql | UTF-8 | 2,247 | 4.125 | 4 | [] | no_license | DROP DATABASE IF EXISTS blogjs;
CREATE DATABASE blogjs;
GRANT ALL PRIVILEGES ON blogjs.*
TO 'huaichao'@'%'
IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
USE blogjs;
CREATE TABLE users
(
username VARCHAR(20) NOT NULL PRIMARY KEY,
password VARCHAR(20) NOT NULL,
fullname VARCHAR(20) NULL,
photo VARCH... | true |
a8057fd87383d43dc451770d85115fe3d7966bf2 | SQL | rach-vp/trybe-exercises | /03_Back_End/21_SQL_Functions_Joins_Subqueries/21.2_JOINs_UNIONs_Subqueries/exercise6.sql | UTF-8 | 491 | 4.3125 | 4 | [] | no_license | -- Exercise 6: Create two queries, one using SUBQUERY and other using INNER JOIN, that returns the title of the movies which its rating is greater than 7.5
-- SUBQUERY (query cost: 4.37)
SELECT
title
FROM
pixar.movies m
WHERE
m.id IN (
SELECT
bo.movie_id
FROM
pixar.boxoffice bo
WHERE
... | true |
2981b0dfdb1ab193e0744ccfd7ce732e63f21f06 | SQL | darlansyah/brian | /pemadamkebakaran.sql | UTF-8 | 8,611 | 2.890625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 06 Jul 2019 pada 20.10
-- Versi server: 10.3.15-MariaDB
-- Versi PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
fa4af873f413593c27e2782a6da7be334edfa3e1 | SQL | webmasternoor/timf | /zones_data.sql | UTF-8 | 2,892 | 2.890625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.16-MariaDB - mariadb.org binary distribution
-- Server OS: Win32
-- HeidiSQL Version: 9.4.0.5144
-- ------------------------------------------------... | true |
60cc64c902b9a9bccbf1301652668a9ff129080a | SQL | japhetGitHub/BootcampX | /4_queries/13_name_of_teachers_and_number_of_assistances.sql | UTF-8 | 310 | 3.59375 | 4 | [] | no_license | SELECT teachers.name AS teacher, cohorts.name AS cohort, COUNT(*) AS total_assistances
FROM assistance_requests
JOIN teachers ON teacher_id=teachers.id
JOIN students ON student_id=students.id
JOIN cohorts ON cohort_id=cohorts.id
WHERE cohorts.name='JUL02'
GROUP BY teachers.name, cohorts.name
ORDER BY teacher; | true |
49c3d6f78384b1d49768d0b4bb02b31e31910ca4 | SQL | saikumar3555/Spring-Applications | /Spring-Security/SpringSecurity-With-DB-App/src/main/resources/db.sql | UTF-8 | 480 | 2.671875 | 3 | [] | no_license |
--Queries to insert sample data into USERS TABLE
INSERT INTO users(username,password,enabled) VALUES ('Ashok','123456', true);
INSERT INTO users(username,password,enabled) VALUES ('Smith','456789', true);
--Queries to insert sample data into USER_ROLES TABLE
INSERT INTO user_roles (username, role) VALUES ('Ashok', 'R... | true |
5ebcb4b3f64d842c5b1e1a4b54251eeb925a3a57 | SQL | erichilarysmithsr/givinggraph | /db/queries/from_nonprofit_ein_to_number_followers.sql | UTF-8 | 166 | 3.203125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SELECT attr.number_of_followers
FROM giving.nonprofit_twitter_attributes as attr, giving.nonprofits as non
WHERE non.ein = 'XX-XXXXXXX' and non.twitter_name = attr.id | true |
a750d5553c62547ac753366c2d0f932b1efb56d2 | SQL | yapozhong/simter-file | /simter-file-data/src/main/resources/tech/simter/file/sql/postgres/schema-create.sql | UTF-8 | 1,094 | 3.015625 | 3 | [] | no_license | /**
* Create table script.
* @author RJ
*/
create table st_attachment (
id varchar(36) primary key,
path varchar(255) not null,
name varchar(255) not null,
ext varchar(10) not null,
size integer not null,
upload_on timestamp not null,
uploader varchar(255) not null,
puid varchar(36) not null defaul... | true |
03cbfd98b6960aea596b81909712cdbb1329178d | SQL | haochenprophet/iwant | /batch/mysql/CREATE-TABLE-demand.sql | UTF-8 | 383 | 2.53125 | 3 | [] | no_license | CREATE TABLE demand (
id BIGINT NOT NULL AUTO_INCREMENT,
who TEXT NOT NULL,
type TEXT NOT NULL,
object TEXT NOT NULL,
location TEXT NOT NULL,
price INT NOT NULL,
count INT NOT NULL,
start_date DATETIME NOT NULL,
end_date DATETIME NOT NULL,
submit_time DATETIME NOT NULL,
image... | true |
ab58a9f351badc7e00475332bf7d1bf96d4c3728 | SQL | thaonguyentn/Railway_09 | /SQL/Assignment 4/Testing_System_Assignment 4.sql | UTF-8 | 21,644 | 4.25 | 4 | [] | no_license | DROP DATABASE IF EXISTS TestingSystem;
CREATE DATABASE IF NOT EXISTS TestingSystem;
USE TestingSystem;
-- create table 1: Department
DROP TABLE IF EXISTS Department;
CREATE TABLE Department (
DepartmentID TINYINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
DepartmentName NVARCHAR(50) NOT NULL UNIQUE KEY
);
-- crea... | true |
be3a703e9b589f449dc6e696eed12cfcfecf88ef | SQL | ferchislopez0910/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/8-count_89.sql | UTF-8 | 189 | 2.6875 | 3 | [] | no_license | -- Write a script that displays the number of records with id = 89 in the table first_table of the database hbtn_0c_0
-- in your MySQL server.
SELECT COUNT(*) FROM first_table WHERE id=89; | true |
cf5cbdac75a60c4acd315bef736f953d09327029 | SQL | eppelduerferjugend/metti | /prisma/migrations/20220805104757_change_target_to_store/migration.sql | UTF-8 | 2,220 | 4.03125 | 4 | [] | no_license | /*
Warnings:
- The primary key for the `LineItem` table will be changed. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `targetId` on the `LineItem` table. All the data in the column will be lost.
- You are about to drop the `OrderTarget` table... | true |
525170de9100a6252aebd44798cda85c54ae0c7d | SQL | shrikeshpandey/Oracle-Data-Mining-PL-SQL-Sample-Programs- | /dmtxtsvm.sql | UTF-8 | 7,513 | 2.6875 | 3 | [] | no_license | Rem
Rem $Header: dmtxtsvm.sql 14-jul-2005.12:16:51 ktaylor Exp $
Rem
Rem
Rem Copyright (c) 2003, 2005, Oracle. All rights reserved.
Rem
Rem dmtxtsvm.sql - Sample program for the DBMS_DATA_MINING package.
Rem
Rem DESCRIPTION
Rem This script creates a text mining model using
Rem SVM classifi... | true |
3053b102c2b757da04ef5f1c9b1449cbc7fcf5ee | SQL | MomusChao/MySQL | /01Basic/85Table_with_condition&_Join.sql | UTF-8 | 1,164 | 3.8125 | 4 | [] | no_license | #85 table with condition & Join
#create a table (table01)
CREATE TABLE table01(ID VARCHAR(10), SalesPerformance INT, MonthP INT);
INSERT INTO table01 VALUES('O901',105,4);
INSERT INTO table01 VALUES('O905',37,3);
INSERT INTO table01 VALUES('O907',88,5);
INSERT INTO table01 VALUES('O906',75,8);
INSERT INTO table01 VALU... | true |
f8bb0879bd72f7e4aca5721f866a4fda7efb5ff9 | SQL | Robb-Fr/db_project | /Notes and questions - Deliverable 2/all_ddl.sql | UTF-8 | 6,727 | 3.421875 | 3 | [] | no_license | create table Vehicle
(
statewide_vehicle_type CHAR(1) CHECK (statewide_vehicle_type IN
('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O')),
vehicle_make CHAR(30),
vehicle_year NUMBER(4),
vehicle_id INTEGER... | true |
21b3c861734b843e9bc4d3b3dd71e092e97e0533 | SQL | Nobleur/Banco_de_Dados | /Systec.sql | UTF-8 | 3,598 | 3.0625 | 3 | [] | no_license | CREATE DATABASE systec;
USE systec;
CREATE TABLE funcionarios(
id int(40) auto_increment,
nome varchar(50) not null,
idade varchar(50) not null,
email varchar(50) not null,
tel varchar(50) not null,
login varchar(50) not null,
senha varchar(50) not null,
salario decimal(10,3) not null,
admissao varchar(50) not null,
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.