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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4744f8e15d88a42aa7fce6f4bbe0e63ea607361b | SQL | Onadius/learnEIL | /PLSQL/kadai/kadai2.sql | UTF-8 | 936 | 2.953125 | 3 | [] | no_license | /*
@C:\Users\Administrator\Desktop\text\SQL\plSQL\kadai.sql
予約語は変数に使えない。ex. sumやall
2.一番小さいEMPNOの人のSALが1000以上だったら
RESULTテーブルのCRESULTに'TRUE',
1000未満だったら'FALSE'をinsertするPLSQLを書きなさい。
*/
SET SERVEROUTPUT ON
DECLARE
miku EMP.ENAME%TYPE := 'TRUE' ;
rin EMP.ENAME%TYPE := 'FALSE' ;
ruka EMP.EMPNO%TYPE ... | true |
0b22fb80590a758897d870c68fb046e41f7e1dc1 | SQL | leightenore/project2 | /db/schema.sql | UTF-8 | 615 | 3.046875 | 3 | [] | no_license | DROP DATABASE IF EXISTS destinations_db;
CREATE DATABASE destinations_db;
USE destinations_db;
CREATE TABLE destinations (
id INTEGER auto_increment NOT NULL,
destination VARCHAR(255) NOT NULL,
biome_choice VARCHAR(255) NOT NULL,
price_choice VARCHAR(255) NOT NULL,
image_one VARCHAR(255) NOT NULL,
... | true |
88ae3050a43ad853a079639519766e706445f098 | SQL | intet/Lyn | /database/sql/main/V-1.0/2018.05.30_04_Create_comics.sql | UTF-8 | 691 | 3.265625 | 3 | [] | no_license | --liquibase formatted sql
--changeset Sivodedov Dmitry:create_table_comic
CREATE TABLE COMIC
(
ID BIGINT PRIMARY KEY NOT NULL IDENTITY,
NAME VARCHAR(255) NOT NULL,
ABOUT VARCHAR(1024) NOT NULL,
URL VARCHAR(255) NOT NULL,
IMG_URL VARCHAR(255) ... | true |
edde19ccca4360290a1ccc03fd35f993b8b7cd67 | SQL | yangho1231/sql-assessment | /db/get_newer.sql | UTF-8 | 195 | 3.203125 | 3 | [] | no_license | select Users.FirstName, Users.LastName, Vehicles.model, Vehicles.year, Vehicles.make FROM Vehicles
JOIN Users
ON Vehicles.ownerId = Users.id
WHERE Vehicles.year > 2000
ORDER BY Vehicles.year ASC
| true |
c1fc3b5b9490ff4f0f3ca74ec5e22190d5225445 | SQL | gyim1345/daily_ps | /mySQL/containsSpecificNames.sql | UTF-8 | 190 | 3.015625 | 3 | [] | no_license | SELECT
CART_ID
from
CART_PRODUCTS
where
NAME = 'Milk' OR NAME = 'Yogurt'
group by
CART_ID
having
count(DISTINCT NAME) >= 2
https://programmers.co.kr/learn/courses/30/lessons/62284 | true |
df3c67e479b68fc31c44ec8a940b566e7b38ad4e | SQL | fagan2888/Loan-Canoe | /notebooks/00_sql/02b_dblink_raw__crossdb_and_randsamp__bbz.sql | UTF-8 | 11,471 | 3.453125 | 3 | [
"MIT"
] | permissive | /**********************************************************************************************************************/
/* Purpose: (1) Generate raw data rand samples for all yrs up to 100 rows + union all years */ ... | true |
4a8ec960d558dc65436ca3db664fe2034dad9b4d | SQL | hanif93/electra | /devices-tabel_2016-05-01.sql | UTF-8 | 2,630 | 2.75 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.3.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1:3306
-- Generation Time: May 01, 2016 at 01:30 PM
-- Server version: 5.6.28
-- PHP Version: 5.6.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
e4aa2c83af581c3d930c1921e73242a4c32b5019 | SQL | defuj/Restaurant-with-Netbeans | /restoran.sql | UTF-8 | 5,966 | 3.171875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 03, 2019 at 05:53 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
e513caec2c2b8f4058acf556c075f19be48ec57d | SQL | sreezreddy09/kruaa | /server/postGres.cql | UTF-8 | 1,633 | 3.78125 | 4 | [] | no_license | //user table for login and user search;
CREATE TABLE userinfo (
user_uid UUID NOT NULL DEFAULT uuid_generate_v4(),
user_name VARCHAR(50) UNIQUE NOT NULL,
email_id VARCHAR(50) UNIQUE NOT NULL,
first_name VARCHAR(20) NOT NULL,
last_name VARCHAR(20) NOT NULL,
password VARCHAR(50) NOT NULL,
time_created bigint NOT ... | true |
0a1dc092af0098d0549bbb619726844591190898 | SQL | rp755/CS4970W-Capstone | /teamcat-db/teamcat-db.sql | UTF-8 | 23,315 | 2.84375 | 3 | [] | no_license | /*******************************************************************************
* Database character set: latin1
* Server version: 5.5
* Server version build: 5.5.5-10.1.34-MariaDB
******************************************************************************/
/****************************************************... | true |
45aaf21845681f04f6d7c6f3d9754b950d3bbdeb | SQL | shroukelsayed/php | /store1.sql | UTF-8 | 4,980 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 02, 2016 at 05:38 PM
-- Server version: 5.5.46-0ubuntu0.14.04.2
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... | true |
635a28efafb2b8be75ff42ec72bf129efba55ec2 | SQL | LambrosVagias23/Projects | /SQL/4.sql | UTF-8 | 772 | 3.875 | 4 | [] | no_license | SELECT COUNT(DISTINCT(plays.date)) FROM plays INNER JOIN tracks ON plays.track_id=tracks.id WHERE plays.country='au' AND lower(tracks.name) = LOWER('Feel Good Inc');
SELECT track_id,date,plays.streams FROM plays WHERE plays.country ='es' AND plays.date LIKE "%2018%" ORDER BY plays.streams DESC;
SELECT * FROM art... | true |
2fe71ddc933116fac66a4b3c810dfc4a10656c1e | SQL | NYNUCTF/NYNUCTF-S1 | /web/请登录/ctf.sql | UTF-8 | 1,321 | 2.84375 | 3 | [
"MIT"
] | permissive | /*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 8.0.19 : Database - ctf
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@F... | true |
83cfefad5356858b78212d18ba16c09a71a95a2e | SQL | DataViva/dataviva-etl | /datasus/cnes/profissionais/select/SELECT_PROF_2012.sql | UTF-8 | 4,662 | 3.328125 | 3 | [] | no_license | #SELECT PROFISSIONAIS
-- Select prof_2012
use cnes_profissionais;
-- STEP 1: Criando a tabela com as variávies selecionadas:
select cnes, codufmun, regsaude, pf_pj, cpf_cnpj, niv_dep, cnpj_man, esfera_a, retencao, tp_unid, niv_hier, cbo, cbounico,
cns_prof, vinculac, vincul_c, vincul_a, vincul_n, prof_sus, profnsu... | true |
60fb81cb0e90055aa30021771552264ccc9db589 | SQL | SvetlanaPeredrii/GoJava | /Java Developer/HW1/3.sql | UTF-8 | 457 | 3.34375 | 3 | [] | no_license | SELECT
SUM(salary)
FROM
project_development_db.developers
JOIN
project_development_db.developers_have_skills ON project_development_db.developers.id_developer = project_development_db.developers_have_skills.id_developer
JOIN
project_development_db.skills ON project_development_db.skills... | true |
7521ec83414877441fb70cf1f06d50127856c915 | SQL | adriana-didden/Employee-Tracker | /employeeTracker.sql | UTF-8 | 1,636 | 3.703125 | 4 | [] | no_license | DROP DATABASE IF EXISTS employee_trackerDB;
CREATE DATABASE employee_trackerDB;
USE employee_trackerDB;
CREATE TABLE employee(
id INT AUTO_INCREMENT,
first_name VARCHAR(30),
last_name VARCHAR(30),
role_id INTEGER,
manager_id INTEGER,
PRIMARY KEY (id)
);
CREATE TABLE role(
id INTEGER (10) NOT... | true |
7e596dec5df41462e303fcc535f49eaed621a599 | SQL | gfis/joeis-lite | /internal/fischer/sql/apery.sql | UTF-8 | 482 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | -- @(#) $Id$
-- 2022-08-07 Georg Fischer
-- replace parm2 with the initial parm2 terms
UPDATE seq4 s SET s.parm2
= (SELECT REGEXP_SUBSTR(d.data, '[\-0-9]+(\,[\-0-9]+){' || CAST(s.parm2 - 1 AS CHAR) || '}')
FROM asdata d
WHERE d.aseqno = s.aseqno
);
UPDATE seq4 s SET s.parm2 = '[1,8,88,1088]' WHERE aseqno I... | true |
d9cc6a4e53a1936d788e953459cf056b4b882b31 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day08/select0013.sql | UTF-8 | 262 | 2.90625 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['3219','4051','2072','2202','1500','5226','1422','3100_7','5216','6066'])
| true |
a2d37e3806059e846c7e16be1d9f970139673e99 | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_baixa_automatica_documento_implantacao_vencimento.sql | UTF-8 | 3,119 | 3 | 3 | [] | no_license |
-------------------------------------------------------------------------------
--sp_helptext pr_baixa_automatica_documento_implantacao_vencimento
-------------------------------------------------------------------------------
--pr_baixa_automatica_documento_implantacao_vencimento
------------------------------------... | true |
e68cdba939e7e29256abfb94a1a7f073be6b4aa1 | SQL | sm-programmer/sepi-server | /db/changeLog.mysql.sql | UTF-8 | 1,212 | 3.4375 | 3 | [] | no_license | --liquibase formatted sql
--changeset sm-programmer:create-table-alumno-1
CREATE TABLE IF NOT EXISTS ALUMNO (
Boleta VARCHAR(12) NOT NULL,
Nombre VARCHAR(45) NOT NULL,
ApPat VARCHAR(45) NOT NULL,
ApMat VARCHAR(45),
Genero ENUM('M', 'F') NOT NULL,
Domicilio VARCHAR(90) NOT NULL,
Colonia VARCHAR(45) NOT NULL,
Te... | true |
1b51ee1b11d983d3fd09080059982116983e20a4 | SQL | martin-rifon/evans | /data.sql | UTF-8 | 16,681 | 2.90625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.4.7
-- Dumped by pg_dump version 9.4.7
-- Started on 2016-04-14 09:26:12 UYT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messag... | true |
a1ce18d26a29bd66b92b51cba23e14abfed55597 | SQL | TeamSyntaxSamurais/simply-news | /db/migrations.sql | UTF-8 | 698 | 3.34375 | 3 | [
"MIT"
] | permissive | CREATE DATABASE simply_news;
use simply_news;
CREATE TABLE accounts (id SERIAL PRIMARY KEY, first_name VARCHAR(255), email VARCHAR(255), password_digest VARCHAR(255), date_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
CREATE TABLE sources (id SERIAL PRIMARY KEY, name VARCHAR(255), rss_url VARCHAR(255), homepage_url V... | true |
e1c550dc76184d583279e6838be1284db77f25f3 | SQL | nirvana-for-ever/community | /src/main/resources/db/migration/V7__add_like_count_to_comment.sql | UTF-8 | 171 | 2.515625 | 3 | [] | no_license | alter table comment modify type int not null comment '评论的类型,是问题的评论还是评论的评论';
alter table comment
add like_count int default 0 null;
| true |
2dff9a042febf758b505bf32e55d583500031d6f | SQL | lirwin/8162tech | /sql/tables.sql | UTF-8 | 3,258 | 3.453125 | 3 | [] | no_license | CREATE TABLE `lirwin_8162tech`.`employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstName` varchar(45) NOT NULL,
`middleName` varchar(45) DEFAULT NULL,
`lastName` varchar(45) NOT NULL,
`jobId` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `FK_employee_job` (`jobId`),
CONSTRAINT `FK_employee_job` FOREIGN ... | true |
6b942e167b837ee6b0a39d60dafa4ec08a975806 | SQL | matthcol/Oracle202105 | /sql_stage/dba12_day4.sql | UTF-8 | 1,816 | 2.640625 | 3 | [] | no_license | alter session set NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';
select * from v$log;
select current_scn from v$database;
select * from v$database_incarnation;
select * from dba_data_files;
select * from v$datafile;
-- RMAN --
-- Database Backup and Recovery User's Guide
-- list command
list backup;
list backup of database;... | true |
462803004675a18aac234ee8c5882c8118326a57 | SQL | yemenPython/leasing_management | /database/sqls/store_procedure_termination.sql | UTF-8 | 2,032 | 3.84375 | 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 utf8mb4 */;
--
-- Database: `witsync_lease`
--
--
-- Procedures
--
DROP PROCEDURE IF EXISTS `prese... | true |
976cb1ec6c36f6f2f150843ff2d5b2c528bd3ef4 | SQL | robertmukhtarov-kfu/db_904_aar | /project/V6_3__order_alter.sql | UTF-8 | 592 | 3.3125 | 3 | [] | no_license | ALTER TABLE `order`
ADD INDEX `fk_order_tariff_id_idx` (`tariff_id` ASC) VISIBLE,
ADD INDEX `fk_order_discount_id_idx` (`discount_id` ASC) VISIBLE;
;
ALTER TABLE `order`
ADD CONSTRAINT `fk_order_player_id`
FOREIGN KEY (`player_id`)
REFERENCES `player` (`id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
ADD CONSTR... | true |
1af599ec197380f1af91095c9720d5442e4bb370 | SQL | erjan/coding_exercises | /the_winner_university.sql | UTF-8 | 1,102 | 4.5 | 4 | [
"Apache-2.0"
] | permissive | '''
There is a competition between New York University and California University. The competition is held between the same number of students from both universities. The university that has more excellent students wins the competition. If the two universities have the same number of excellent students, the competition ... | true |
cfc8f0cb5c403973df0f2448cafd4ad9bdcd9f8c | SQL | JonathanRH07/Control-de-versiones | /DB ICAAVweb/Suite_mig_demo/Stored_Procedures/sp_fac_factura_cfdi_archivo.sql | UTF-8 | 711 | 3.109375 | 3 | [] | no_license | DELIMITER $$
CREATE DEFINER=`suite_deve`@`%` PROCEDURE `sp_fac_factura_cfdi_archivo`(
IN pr_id_factura INT,
IN pr_tipo VARCHAR(45),
OUT pr_message VARCHAR(500))
BEGIN
/*
@nombre : ic_fac_tr_factura_cfdi_archivo
@fecha : 13/10/2017
@descripción :
@autor : Shani Glez
@cambios :
*/
DE... | true |
a467fae541349b77b22143cde84b8eea3881516b | SQL | irobot0/thinkphp-demo | /dababase.sql | UTF-8 | 2,084 | 3.546875 | 4 | [
"MIT"
] | permissive | create schema dev_resource;
use dev_resource;
grant all on dev_resource.* to dbuser@'%' identified by 'rbac12345';
FLUSH PRIVILEGES;
CREATE TABLE IF NOT EXISTS `admin_user` (
`uid` int unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL,
`mobile` varchar(32) NOT NULL,
`password` varchar(32) NOT... | true |
252253f10d494a4c5ab2b0693ae6997cd18068bd | SQL | rjyoung736/i2b2ACTtoHPDS | /Previous/ACT_HPDS_04_Visit_Data_Load.sql | UTF-8 | 4,352 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | --Combined script for Visit ACT fact data for HPDS.
-- Combined_Script_ACT_DATA_02.sql has to be deployed before running this script to create
create table TM_CZ.A_NCATS_VISIT_DETAILS_MAP ( bch_visit_type varchar2(500) ,act_visit_type varchar2(500) );
--Mapping table visit type
insert into TM_CZ.A_NCATS_VISIT_DE... | true |
fa03d425f1bcd10c55f4e6a80e538ab5afeff0b9 | SQL | VladislavYVT/dbis | /km51/Yavtukhovskyi_Vladyslav/laboratory3.sql | WINDOWS-1251 | 2,967 | 3.796875 | 4 | [] | no_license | /*1. PL/SQL , BRS01, 4.
- prod1prodn. BRO1.
10 */
DECLARE
count_prod int;
pr_name products.prod_name%type;
pr_price products.prod_price%type;
BEGIN
SELECT COUNT(*) into count_prod FROM Products where vend_id='BRS01';
SELECT prod_name, prod_price into pr_name, pr_price FROM products ... | true |
767404b6fdc1e6d61d7f2f5485065a170bb0f165 | SQL | LucasChagas2100/ExerciciosMySQL | /Aula 25/Ex5TabelaEscola.sql | UTF-8 | 2,074 | 3.75 | 4 | [] | no_license | /*create database db_school;
use db_school;
create table tb_aluno (
ra bigint auto_increment,
nome varchar (100) not null,
serie varchar (2),
media double,
ativo boolean,
primary key (ra)
) AUTO_INCREMENT = 20200;
*/
/* Popule esta tabela com até 20 dados;
insert into tb_aluno (nome, ser... | true |
09a98d799a927594019afc38ac0a2ac3247bf63c | SQL | haidarafif0809/database-tracking | /public/sql/cc0ab4f587eb7db9143c9530dd59b0ac.sql | UTF-8 | 15,607 | 2.5625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.3.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 14, 2016 at 04:02 AM
-- Server version: 5.5.42-37.1-log
-- PHP Version: 5.4.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... | true |
20b74f3ec65aec3357302a837a4932ecf5951c76 | SQL | minhtho288/quanlydongho | /quanlydongho.sql | UTF-8 | 17,316 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 14, 2020 at 04:47 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
733330193bbbd1edc336d8259bb5dae8ae43b764 | SQL | Felix2190/res_tams | /include/bd/E_201712261615_F.sql | UTF-8 | 1,554 | 2.953125 | 3 | [] | no_license |
ALTER TABLE `persona` ADD `nacionalidad` ENUM('mex','ext') NOT NULL DEFAULT 'mex' AFTER `homoclave`;
ALTER TABLE `persona_datos_extras` ADD `observaciones` TEXT NOT NULL ;
ALTER TABLE `inegi_domicilio` ADD `numeroInterior` SMALLINT(3) NOT NULL AFTER `numeroExterior`;
ALTER TABLE `persona_datos_extras` CHANGE `i... | true |
f7352c532e141b06af373440f74576fc856e2317 | SQL | Abijithkrishna/studentinfo | /studentinfo.sql | UTF-8 | 7,155 | 2.78125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 02, 2015 at 06:42 AM
-- 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 |
745e07eb62360a530a93fbaa4858ef23a90d6beb | SQL | hnomichith/NF17 | /structure.sql | UTF-8 | 2,314 | 4.09375 | 4 | [] | no_license | -- On a crée une table tLieu à la place de la vue
-- pour faire un héritage par référence
CREATE TYPE typePeriode AS ENUM('matin', 'après-midi', 'soirée', 'nuit');
CREATE TYPE typePrevision AS ENUM('précipitations', 'vent', 'température', 'autre');
CREATE TYPE typeDirection AS ENUM ('N', 'S', 'O', 'E');
CREATE TABLE... | true |
8268d22c1a44bf58ac8c580797a4e2899ace03a2 | SQL | l-wang/gpdb | /src/test/regress/sql/alter_table_set.sql | UTF-8 | 6,699 | 3.796875 | 4 | [
"Apache-2.0",
"PostgreSQL",
"ISC",
"LicenseRef-scancode-other-copyleft",
"BSD-2-Clause",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-ssleay-windows",
"OpenSSL",
"LicenseRef-scancode-stream-benchmark",
"Python-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | -- https://github.com/greenplum-db/gpdb/issues/1109
--
-- ALTER TABLE ... SET WITH (REORGANIZE = true); should always redistribute the
-- data even with matching distribution policy
create table ats_dist_by_c (c int, d int) distributed by (c);
create table ats_dist_by_d (c int, d int) distributed by (d);
insert into a... | true |
12bae29d1741c5815687e7c1e85728a5ff7f868e | SQL | hannahg141/cs61a | /hw/hw10/hw10.sql | UTF-8 | 4,847 | 3.90625 | 4 | [] | no_license | -------------------------------------------------------------
-- DOGS --
-------------------------------------------------------------
create table parents as
select "abraham" as parent, "barack" as child union
select "abraham" , "clinton" union
... | true |
8dbc2fb9394dc62b411c7a6a9eeb1c174cf18cbf | SQL | miyabayt/spring-boot-doma2-sample | /sample-domain/src/main/resources/META-INF/com/bigtreetc/sample/domain/dao/StaffRoleDao/selectAll.sql | UTF-8 | 617 | 3.765625 | 4 | [
"Apache-2.0"
] | permissive | SELECT
staff_role_id
, sr.staff_id
, sr.role_id
, r.role_code
, r.role_name
, p.category_code
, p.permission_code
, p.permission_name
, sr.version
FROM
staff_roles sr
LEFT JOIN roles r
ON sr.role_code = r.role_code
AND r.deleted_at IS NULL
LEFT JOIN permissions p
ON r.permission_code... | true |
76b8e48061f80d8c5980386d4ce730e7cb88e1e4 | SQL | vitorcool45/Vitor | /BD ex2/ex6.sql | UTF-8 | 1,387 | 3.84375 | 4 | [] | no_license | CREATE DATABASE db_cursoDaMinhaVida;
USE db_cursoDaMinhaVida;
CREATE TABLE tb_categoria(
id bigint auto_increment,
tipo varchar (255),
modalidade varchar (255),
semestre varchar (255),
primary key (id) );
CREATE TABLE tb_produtos(
id bigint auto_increment,
nome varbinary (255),
matricula int,
nChamada int,
nomeEscol... | true |
3fc67ca858e40401741fec2e8645b3a4336b3919 | SQL | mkubiak164/car_loan | /views.sql | UTF-8 | 2,213 | 4.71875 | 5 | [] | no_license | -- Stwórz widok który przedstawi klientów wraz z datami wypożyczeń i markami samochodów.
DROP VIEW v_customer_car;
CREATE VIEW v_customer_car AS (
SELECT c.*, date_from, date_to, mark
FROM customer c
JOIN loan l ON c.customer_id=l.customer_id
JOIN car ON l.car_id=car.car_id);
SELECT customer_id, COUNT(*) FROM lo... | true |
61357444292e88ec851f7a9a73b933fcfbcee5fa | SQL | AngusCuskelly/PortfolioProjects | /COVID Portfolio Project - Data Exploration.sql | UTF-8 | 4,812 | 4.28125 | 4 | [] | no_license | /*
Covid-19 Data Exploration
Skills used: Joins, CTE's, Temp Tables, Windows Functions, Aggregate Functions, Creating Views, Converting Data Types
*/
select *
from PortfolioProject..CovidDeaths
where continent is not null
order by 3,4
-- Select the Data that we are going to be starting with
select l... | true |
571b81de13963f0ae27690e69b167cbbc904a70a | SQL | jacquesmilitello/m3 | /m3-event/m3-core/src/main/resources/db/migration/h2/V00001__schema.sql | UTF-8 | 392 | 2.828125 | 3 | [] | no_license | CREATE TABLE `m3_event_store` (
`id` bigint,
`aggregate_type` VARCHAR(64),
`aggregate_id` VARCHAR(64),
`trace_id` CHAR(16),
`created_at` TIMESTAMP,
`event` VARCHAR(4000),
PRIMARY KEY (`id`)
);
CREATE SEQUENCE seq__m3_event_store;
CREATE INDEX `idx__m3_e... | true |
5ae7a7a05147605369cd28c445b72d1febb177fb | SQL | RonaldoVindas/1S-2021-Bases-de-Datos-1-Proyecto-1 | /Scripts/Packages/Status_package.sql | UTF-8 | 4,498 | 3.546875 | 4 | [] | no_license | Create or replace package control_status is
PROCEDURE insert_status (pname IN VARCHAR2, pdescription IN VARCHAR2);
PROCEDURE remove_status (pid IN NUMBER);
PROCEDURE update_status(pid IN NUMBER,pname IN VARCHAR2,pdescription IN VARCHAR2);
FUNCTION getstatusId(pname in varchar2) return number;
FUNCTION getstatusName(p... | true |
8913a6be24ef5b530041451eb52474a2fdf0c9ca | SQL | loc-nt/Pewlett-Hackard-Analysis | /queries.sql | UTF-8 | 3,178 | 4.4375 | 4 | [] | no_license | -- Retirement eligibility
SELECT first_name, last_name
FROM employees
WHERE (birth_date BETWEEN '1952-01-01' AND '1955-12-31')
AND (hire_date BETWEEN '1985-01-01' AND '1988-12-31');
-- Number of employees retiring
SELECT COUNT(first_name)
FROM employees
WHERE (birth_date BETWEEN '1952-01-01' AND '1955-12-31')
AND (hir... | true |
daf17539439dd17407580b6bef8e7325d7a4b52c | SQL | wanghui0101/stateless-auth-sample | /sa-sample.sql | UTF-8 | 4,819 | 3.09375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_本地
Source Server Version : 50624
Source Host : localhost:3306
Source Database : sa-sample
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2016-06-07 13:01:27
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
a3bdf4dfd2f55a87435e0492396e23fc880f83a2 | SQL | minasman/sql-library-lab-v-000 | /lib/insert.sql | UTF-8 | 3,137 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO series (id, title, author_id, subgenre_id) VALUES (1, "Game of Thrones", 1, 1);
INSERT INTO series (id, title, author_id, subgenre_id) VALUES (2, "Harry Potter", 2, 2);
INSERT INTO subgenres (id, name) VALUES (1, "Medieval Fantasy");
INSERT INTO subgenres (id, name) VALUES (2, "Witches");
INSERT INTO aut... | true |
958d9f596bbf142e65f277ed04d9862a8d33395e | SQL | cameronmcphie/431FinalProject | /CsufBasketballDDL.sql | UTF-8 | 3,750 | 3.8125 | 4 | [] | no_license | drop database if exists CsufBasketball;
create database if not exists CsufBasketball;
drop user if exists 'Manager';
grant select, insert, update, execute on CsufBasketball.* to 'Manager' identified by 'withheld';
drop user if exists 'User';
grant select, update, execute on CsufBasketball.* to 'User' identified by 'w... | true |
ebd61b930c34d84d4bb1368c67539950e12c5bac | SQL | dbmdz/elucidate-server | /elucidate-db-scripts/sequences/control_panel_user_id_seq.sql | UTF-8 | 437 | 2.546875 | 3 | [
"MIT"
] | permissive | -- Sequence: public.control_panel_user_id_seq
-- DROP SEQUENCE public.control_panel_user_id_seq;
CREATE SEQUENCE public.control_panel_user_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.control_panel_user_id_seq
OWNER TO postgres;
GRANT ALL ON SEQUENCE publi... | true |
ee9e2c58e5919d22b1d07fe22e47987211e906b0 | SQL | bellmit/webdemo | /dbscript/mysql/01basisscript/operator/tables/oper_operator_ref.sql | UTF-8 | 1,023 | 3.453125 | 3 | [] | no_license | /*****************************************************************************
-- OPER_OPERATOR_REF :
*****************************************************************************/
drop table if exists OPER_OPERATOR_REF;
create table OPER_OPERATOR_REF(
id varchar(64) not null,
operatorId varchar(64) not null,
... | true |
acfe8704e6f84a9a7cd08a836f50a8015ce3ec38 | SQL | rhassuncao/PLSQLExercises | /pt-br/lista 1/seq-016.sql | ISO-8859-1 | 300 | 3.28125 | 3 | [] | no_license | --Crie uma view para o exerccio 10 chamada view_ex10
CREATE VIEW VIEW_EX10 AS
SELECT FAB.NOME AS FABRICANTE, CID.NOME AS CIDADE, BEB.DESCRICAO AS BEBIDA FROM FABRICANTES FAB
JOIN CIDADES CID ON CID.CODIGO = FAB.CODCIDADE
JOIN BEBIDAS BEB ON BEB.CODFABRICANTE = FAB.CODIGO; | true |
5a55a9d0657919b108533602c405eb74cdca760e | SQL | Jeff-Wang93/school_reg | /DB_table_declarations/old_sql/make_course.sql | UTF-8 | 617 | 3.265625 | 3 | [] | no_license | DROP TABLE IF EXISTS course CASCADE;
CREATE TABLE public.course
(
course_id integer primary key,
course_units integer NOT NULL,
course_grade_type character varying(10) NOT NULL,
course_number character varying(10) NOT NULL,
course_lab character varying(10)... | true |
3983273aec49d69663a4cfb995af96ae3890d989 | SQL | fanlens/common | /common/db/migration/versions/022_Twitter_DM_Source_Type_postgresql_downgrade.sql | UTF-8 | 867 | 3.609375 | 4 | [
"MIT"
] | permissive | -- recreate original type
CREATE TYPE activity."type" AS ENUM
('facebook', 'twitter', 'crunchbase', 'generic');
ALTER TYPE activity."type"
OWNER TO fanlens;
-- back up source
DROP TABLE IF EXISTS activity.source_backup_v22;
SELECT * INTO activity.source_backup_v22 from activity.source;
-- delete the sources using no... | true |
516cc19b9102a58ab8325841abc9a13c45f7930e | SQL | ritscc/hack-2021-1-c | /app/src/main/resources/db/migration/V0_1_1__create_stamp.sql | UTF-8 | 521 | 3.6875 | 4 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `stamp` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`title` VARCHAR(255) NOT NULL,
`description` TEXT NOT NULL,
`user_id` INT UNSIGNED NOT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TI... | true |
10018ca6e90e3917ff108e84b334a79236a597a0 | SQL | faustorichardson/sistemas | /Sistema Combustibles ARD/BackupBD/20151203 rango.sql | UTF-8 | 5,334 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50627
Source Host : localhost:3306
Source Database : mdeg_dispensariomedico
Target Server Type : MYSQL
Target Server Version : 50627
File Encoding : 65001
Date: 2015-12-03 19:27:01
*/
SET FOREIGN_KEY_... | true |
7f7b2402360e0efc2de74ea947c2ae154153e142 | SQL | tyger07/Unofficial-Version-of-CChatGUIDStatsLogger-version-3.0.2.2 | /2.x_to_3.x_v4.sql | UTF-8 | 5,812 | 3.75 | 4 | [] | no_license | #Enter your database
USE your_database_here ;
START TRANSACTION;
#Tablesuffix
SET @SUFFIX='yourSuffixhere';
#Preparation and Execution
SET @sqltext = CONCAT('ALTER TABLE tbl_playerstats',@SUFFIX,' ENGINE = MyISAM');
PREPARE stmt1 FROM @sqltext;
EXECUTE stmt1;
SET @sqltext = CONCAT('CREATE TABLE tbl_playerstats',@SUFFIX... | true |
0bd3dc01a97d7b52d443ca39edfc52465c971f22 | SQL | AnhPmcl2015/do-an-chuyen-nganh | /Báo cáo/jobcentral.sql | UTF-8 | 9,809 | 3.546875 | 4 | [] | no_license | create database jobcentral;
ALTER DATABASE news_database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
use jobcentral;
create table nation(
id int8 auto_increment primary key,
nation_name nvarchar(50)
);
create table address(
id int8 auto_increment primary key,
address nvarchar(200) not null default '',... | true |
4e7b7e9f6ccad10eb0d458bbaec9b80440ad12cb | SQL | iyayu/IyyBasis | /WebUI/src/main/resources/appConfig/db/V1__init_basics_database_and_data.sql | UTF-8 | 13,239 | 3.140625 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50720
Source Host : localhost:3306
Source Database : basics_database
Target Server Type : MYSQL
Target Server Version : 50720
File Encoding : 65001
Date: 2018-01-24 20:57:46
*/
SET FOREIGN_KEY_CHECKS=... | true |
3c9484f4ce2613c420a474b020805b5c9b6d3470 | SQL | a-voloshina/DataBase | /Backend/src/main/resources/db/migration/V4__insertions.sql | UTF-8 | 16,132 | 2.53125 | 3 | [] | no_license | insert into countries(name) values('Англия');
insert into countries(name) values('Российская империя');
insert into countries(name) values('Франция');
insert into countries(name) values('Россия');
insert into countries(name) values('Дания');
insert into countries(name) values('Литва');
--actors
insert into employees(fi... | true |
8ff23d8969d7e2e7c54270ff3302660a7dfd59b8 | SQL | Gwayway/moneygot | /src/main/resources/money.sql | UTF-8 | 7,848 | 2.984375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: localhost Database: moneygot
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... | true |
d4eb9c781d9b20c389248000242995e8f72ee862 | SQL | dediscount/gourylls | /sql/gourylls.sql | UTF-8 | 8,401 | 2.671875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2015-01-18 15:09:04
-- 服务器版本: 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 */;
/*!40101 SET ... | true |
9d1ff67ad2faab5f9b541ca845dbb32ba47a32dd | SQL | luwg/MyRecommend_Plus | /out/artifacts/douban_recommand_war_exploded/sql/douban_sql/t_movie_category.sql | UTF-8 | 2,136 | 2.890625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50538
Source Host : localhost:3306
Source Database : douban_recommand
Target Server Type : MYSQL
Target Server Version : 50538
File Encoding : 65001
Date: 2016-01-07 22:01:07
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
f8cdbc4bdca377b50e9db03e11e86f7532019470 | SQL | enoquedesouza/WirecardChallenge | /WirecardChallengePaymentAPI/src/main/resources/db/migration/V01__Tabelas.sql | UTF-8 | 2,312 | 3.546875 | 4 | [] | no_license | create table clientes (
id_cliente bigserial not null,
nome varchar(80) not null,
cnpj varchar(30) not null,
constraint clientes_pkey primary key(id_cliente)
);
create table vendas(
id_venda bigserial not null,
status varchar(80) not null,
datadavenda date not null,
constraint vendas_pkey primary key(id... | true |
ae2de01183de6ab2d431043540e437e63a865de3 | SQL | wumiantu/shouyin | /9ywm.sql | UTF-8 | 10,315 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.6
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015 年 12 月 01 日 03:03
-- 服务器版本: 5.0.96-community-nt
-- PHP 版本: 5.2.17
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_... | true |
02e2eb426c050bcb241b999a90f19a08f116177c | SQL | radtek/abs3 | /sql/mmfo/bars/View/v_xmlimpdrec.sql | WINDOWS-1252 | 1,578 | 2.734375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_XMLIMPDREC.sql =========*** Run *** =
PROMPT =====================================================================================
PROMPT *** Create view V_XM... | true |
d6f2e0f6e4ebe09fefc8244d6f4287d2a0b25f67 | SQL | StarExec/StarExec | /sql/SchemaChanges/00000007.sql | UTF-8 | 512 | 2.71875 | 3 | [
"MIT"
] | permissive | -- Modify table solvers by dropping column "config_deleted", which was added in the
-- previous SchemaChange, 00000006.sql
--
-- Alexander Brown
DROP PROCEDURE IF EXISTS UpdateTo6_7 //
CREATE PROCEDURE UpdateTo6_7()
BEGIN
IF EXISTS (SELECT 1 FROM system_flags WHERE major_version=1 AND minor_version=6) T... | true |
dd8579ea90d716efaeca4e9995748556c51e64a7 | SQL | rashed21/summitAccountiog | /src/main/resources/META-INF/sql/sample_05OCT2016_01.sql | UTF-8 | 2,696 | 3.109375 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.41-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO... | true |
c5713e93270406336137339a3911e3a6bc8ca76f | SQL | leticiaporto/cae | /banco/controledeespaco-v4.sql | UTF-8 | 18,475 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3308
-- Generation Time: 03-Dez-2019 às 16:26
-- Versão do servidor: 5.7.24
-- versão do PHP: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
50af3b6cfc02571c03732fa3a19b03b0802ca3df | SQL | yashdhingra2198/Grayshade | /messages.sql | UTF-8 | 2,138 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 14, 2018 at 10:29 AM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
680affc8be03cac85af8621e2545ea67780ef96b | SQL | YasinulA/AirLineReservation | /BackEnd/AirlineReservationCreateTables.sql | UTF-8 | 2,029 | 3.5 | 4 | [] | no_license | --Creating the Flight table
CREATE TABLE Flight (
Flight_ID varchar2(5) NOT NULL,
Flight_Destination varchar2(25) NOT NULL,
Flight_Source varchar2(25) NOT NULL,
Airline varchar2(15) NOT NULL,
Flight_Date date NOT NULL,
Flight_Cost number(7,2) NOT N... | true |
6871e7a930f40c5f8d2bf8050157a28789c3371c | SQL | javadev/pt-backend | /src/main/resources/db/migration/V4.75__create_in_user_photo_table.sql | UTF-8 | 623 | 3.21875 | 3 | [
"MIT"
] | permissive | DROP TABLE ptcore.in_user_goal_photo CASCADE;
DROP TABLE ptcore.in_user_goal_has_in_user_goal_photo CASCADE;
CREATE TABLE ptcore.in_user_photo (
id BIGSERIAL PRIMARY KEY NOT NULL,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
goal_id BIGINT NOT NULL,
file_name VARCHAR(200) NOT NULL DEFAUL... | true |
ee5f46d19fec9a4e831adc5597ae451549bd87fe | SQL | LuisFuenTech/kardex-peps-web | /utils/scriptSQL/kardex.peps-db.sql | UTF-8 | 2,810 | 3.234375 | 3 | [] | no_license | CREATE TABLE `detalle`
(
`id_detalle` int
(11) NOT NULL,
`nombre_detalle` varchar
(45) CHARACTER
SET utf8
COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `detalle_peps`
(
`id_detalle` int
(11) NOT NULL,
`nombre_detalle` varchar
(45) CHARACTER
SET utf... | true |
68cd589cb0e68777d4f45b68f613156b8ec3de0c | SQL | wistonmiguel/NicaVentas | /Lv4/schema.sql | UTF-8 | 21,155 | 3.1875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS location(
country varchar(2) NOT NULL,
city varchar(52) NOT NULL,
active ENUM('True', 'False') NOT NULL,
PRIMARY KEY (country, city)
) ENGINE=innodb DEFAULT CHARSET=utf8 DEFAULT COLLATE utf8_unicode_ci;
CREATE TABLE IF NOT EXISTS product(
sku varchar (7) NOT NULL,
des... | true |
0bcf7a731f27534f6febc9f2351047718b7f0ae3 | SQL | teamoneillprojects/courses | /oracle-database-primer/breakdown-modifying-data.sql | UTF-8 | 7,702 | 3.140625 | 3 | [] | no_license | rem
rem SCRIPT breakdown-modifying-data.sql
rem
rem COURSE Oracle Database Primer
rem https://teamoneill.org/course/oracle-database-primer
rem
rem LESSON Modifying Data
rem https://teamoneill.org/lesson/modifying-data
rem
rem 2020-12-06 teamoneill created
rem
rem Copyright (c) 2020 Michael O'Neill. All ... | true |
a27a5d282aaddc4546fb1551e5141b7efa1831e3 | SQL | hbqi207c/ebs | /PO/采购品类的供应商.sql | UTF-8 | 455 | 3 | 3 | [] | no_license | SELECT V1.ORG_ID,
V1.ORG_NAME,
V1.ORG_TYPE_NAME,
V2.CATEGORY_NAME,
V2.APPROVE_ORG_NAME,
V2.DISABLED_FLAG,
V3.VENDOR_NAME,
V3.DATE_FROM,
V3.DATE_TO
FROM APPS.CUX_PO_SEC_CONTROL_HEADERS_V V1,
apps.CUX_PO_SEC_CONTROL_LINES_V V2,
apps.CUX_... | true |
a7ce78f62416cf55655b45b877947180880c3f51 | SQL | ashna-jolly/ADBMS | /CYCLE 2/SET 3.sql | UTF-8 | 2,007 | 4.5625 | 5 | [] | no_license | CREATE TABLE CUSTOMER
(
CUST_ID INT PRIMARY KEY,
CUST_NAME VARCHAR(25)
);
DESCRIBE CUSTOMER;
CREATE TABLE ITEM
(
ITEM_ID INT PRIMARY KEY,
ITEM_NAME VARCHAR(25),
PRICE INT
);
DESCRIBE ITEM;
CREATE TABLE SALE
(
BILL_NO INT PRIMARY KEY,
BILL_DATE DATE,
CUST_ID INT,
ITEM_ID INT,
QTY_SOLD INT,
CONSTRAINT FK_CUST FOREIGN... | true |
1520347f4a40d3e0410705bf236f27fce674be1a | SQL | tfisher1226/ARIES | /bookshop2/bookshop2-supplier/deploy/sql/db-create-bookshop2db.sql | UTF-8 | 536 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | use mysql;
drop database if exists bookshop2DB;
create database bookshop2DB;
delete from user where user='manager';
delete from db where user='manager';
FLUSH PRIVILEGES;
create user 'manager'@'localhost' identified by 'manager';
create user 'manager'@'%' identified by 'manager';
set password for manager = password('ma... | true |
4de9138a73f62ea0e3fea6c8950d40e20aff6f5f | SQL | shuwenhe/shuwen-shop-admin | /sql/admin_item_cat.sql | UTF-8 | 1,448 | 3.53125 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : shuwenshopadmin
Source Server Type : MySQL
Source Server Version : 50647
Source Host : 62.234.11.179:3306
Source Schema : shuwenshopadmin
Target Server Type : MySQL
Target Server Version : 50647
File Encoding : 65001
Dat... | true |
4b06740075f0c4b8fa28c27d28675c668c69d008 | SQL | w3bf1ghtFeature/yeticave | /queries.sql | UTF-8 | 3,126 | 3.546875 | 4 | [] | no_license | INSERT INTO `users` (`email`, `password`, `name`, `contact_info`, `creation_time`)
VALUES ('Ivanich@mail.ru', 'ivan123', 'Ivan', 'Mobile phone: +79008008844', NOW()),
('Petrovich@mail.ru', 'petr123', 'Petr', 'Mobile phone: +79008007733', NOW());
INSERT INTO `categories` (`name`, `code`)
VALUES ('Доски и лыжи', ... | true |
b0146e794d0debac0c8b148bea65f650249d2632 | SQL | zerojuls/b2b | /SQL/GET_SALDOSXCAJA.sql | UTF-8 | 3,093 | 3.015625 | 3 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS GET_SALDOSXCAJA$$
CREATE PROCEDURE `GET_SALDOSXCAJA`(
IN fecha INT
)
BEGIN
SELECT
C.cuen_caja AS Cuenta,
C.c_caja AS Caja,
(SELECT ifnull(sum(importedol),0) FROM NUEVA_TRANSACCION N
WHERE N.id_cajabanco = C.c_codigo
AND N.fecha_sistema < (SELECT CONCAT(f... | true |
8c163eebe7f1d8cd6b783af6047d88b3315ed089 | SQL | dudusv2/PizzaNoc | /PizzaNoc/DATABASE/pizzanoc1.sql | UTF-8 | 11,208 | 3.59375 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Czas generowania: 12 Sty 2018, 23:40
-- Wersja serwera: 10.1.28-MariaDB
-- Wersja PHP: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
04e762e4b72b9d422d329a00cd632d3379f67be8 | SQL | awanz/ci3-restapiserver | /company.sql | UTF-8 | 1,393 | 2.90625 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.4.8-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.0.0.5919
-- ------------------------------------------------... | true |
77a201557f943a044ffc44c50d5f6e9f9333774c | SQL | isford/weekend-sql-to-do-list | /weekend-to-do-app.sql | UTF-8 | 293 | 3 | 3 | [
"MIT"
] | permissive | CREATE TABLE "tasks" (
"id" SERIAL PRIMARY KEY,
"task_name" VARCHAR (250),
"task_priority" VARCHAR (10)
);
INSERT INTO "tasks"
("task_name", "task_priority")
VALUES
('Mek it gud', 'Medium'),
('Then mek it bettuh', 'Low');
ALTER TABLE "tasks"
ADD "task_complete" BOOLEAN DEFAULT 'false';
| true |
d8146b3b277bc70fd7112f52a282c199ca340978 | SQL | rudgjs8080/2021_04_DBMS | /Oracle/농협마트(2021-05-07_농협마트).sql | UTF-8 | 3,645 | 4.21875 | 4 | [] | no_license | -- 2021-05-07 농협마트
drop table tbl_iolist;
create table tbl_iolist(
io_seq number primary key,
io_date varchar2(10) not null,
io_time nvarchar2(50) not null,
io_pname nvarchar2(50) not null,
io_dname nvarchar2(50) not null,
io_dceo nvarchar2(20) not null,
io_inout varchar2(1) not null,
... | true |
842b2c6b99195ee93b8828b7611503f0b13646a0 | SQL | sgreenholtz/php_course_work | /lab_10/lab_10.sql | UTF-8 | 399 | 2.96875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS lab_10;
USE lab_10;
CREATE TABLE IF NOT EXISTS Products (
ID int(11) NOT NULL AUTO_INCREMENT,
ProductType VARCHAR (60) NOT NULL,
Title VARCHAR(255) NOT NULL,
Price DECIMAL(7,2) NOT NULL,
Description Text,
Shipper VARCHAR(255) DEFAULT NULL,
Weight DECIMAL(5,2) ... | true |
541b49788a778bc8d8dfda2ccf38f3127369e793 | SQL | UniversaBlockchain/universa | /universa_node/src/main/resources/migrations/postgres/migrate_21.sql | UTF-8 | 429 | 3.140625 | 3 | [] | no_license | alter table contract_subscription add column environment_id bigint;
create index ix_contract_subscription_environment_id on contract_subscription(environment_id);
update contract_subscription set environment_id=subquery.environemtn_id from (
select id, subscription_id, environemtn_id from environment_subscription
... | true |
c11525a7b7f50e5819fcd219293c897d2b2e7566 | SQL | naggenius/BIP | /BIP_App-master/UX/Livraison/SQL/plsql/VUE_EBIS_LOG_LIGNE_SUPP.sql | UTF-8 | 1,475 | 3.46875 | 3 | [] | no_license | CREATE OR REPLACE FORCE VIEW "BIP"."EBIS_LOGS_CONT_LIGNE_SUPP" ("TYPE_ACTION", "DATE_LOG", "USER_LOG", "CONTRAT", "PERIMETRE", "REFFOURNISSEUR", "FOURNISSEUR", "LIGNE", "CODE_RESSOURCE", "NOM_RESSOURCE", "DATEDEB_LIGNE", "DATEFIN_LIGNE", "SOCIETE", "SIREN", "AVENANT", "DATDEBCONTRAT", "DATFINCONTRAT") AS
SELECT l.ty... | true |
95c68b87ab365e684dd3d05f52c3dc91942244cc | SQL | foliage11111/times-srm-sql | /合同模块-台账查询1.sql | GB18030 | 8,693 | 3.1875 | 3 | [] | no_license | /*begin
mo_global.init('M');
end;*/
select t1.rowid row_id,
t1.fcsid, --ID
t1.fconid, --ͬID
t1.fnumber, --
--'22' fnumber,
t1.fsettledate, --
t1.fprjid,
t1.fprjno,
c.Fpjnumber Prjnumber, --Ŀ
c.fpjname prjname, --Ŀ
t1.fpbid,
t1.f... | true |
b1c8854e9e17fa5935efce92c1c56aebca0c74ad | SQL | ox-it/sakai | /edu-services/gradebook-service/sakai-pack/src/resources/oracle/sakai_gradebook_post_schemaupdate.sql | UTF-8 | 1,308 | 3.421875 | 3 | [
"LicenseRef-scancode-generic-cla",
"ECL-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | -- Most automatic database initialization will be taken care of automatically
-- by Hibernate's SchemaUpdate tool, triggered by the hibernate.hbm2ddl.auto
-- property in vanilla Hibernate applications and by the auto.ddl property
-- in the Sakai framework.
--
-- Not all necessary elements might be created by SchemaUpda... | true |
f89c7ebf4bffea432ca2428fa3804ddabc97fda7 | SQL | AkashPuri/PLGPLProject | /SQL/facutyDB.sql | UTF-8 | 3,896 | 3.15625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: facultydatabase
-- ------------------------------------------------------
-- Server version 5.5.3-m3-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER... | true |
e3b30d55924c13422c953a764642e0294ecaa3bf | SQL | Campeanu/Box3D | /mysql.sql | UTF-8 | 2,126 | 2.765625 | 3 | [
"MIT"
] | permissive | db_name:
box3dloginsystem
users_table:
CREATE TABLE users (
idUsers int(11) AUTO_INCREMENT PRIMARY KEY NOT NULL,
uidUsers TINYTEXT NOT NULL,
emailUsers TINYTEXT NOT NULL,
pwdUsers LONGTEXT NOT NULL
);
/**
connection->mysql_stmt_execute(
"CREATE TABLE ... | true |
590aa9664af5175b08fce4bce2e47d9273d91648 | SQL | Zombach/rock-hard-crm | /CRM.DB/StoredProcedures/Lead/Lead_Insert.sql | UTF-8 | 570 | 2.734375 | 3 | [] | no_license | CREATE PROCEDURE dbo.Lead_Insert
@FirstName nvarchar(50),
@LastName nvarchar(50),
@Patronymic nvarchar(50),
@Email nvarchar(50),
@PhoneNumber nvarchar(12),
@Password nvarchar(200),
@Role int,
@CityId int
AS
BEGIN
INSERT INTO dbo.[Lead]
([FirstName],
[LastName... | true |
ae7f2bd50d7cf25c8bff67eb375aace8164aa376 | SQL | RomainBon/BDD_Ethera | /EtheraMB.sql | UTF-8 | 10,212 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 16, 2018 at 01:38 PM
-- Server version: 5.7.20-0ubuntu0.16.04.1
-- PHP Version: 7.0.22-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... | true |
95dc16dce9ca3be4bb35775c494d52b4bf683ad7 | SQL | coldnew/antlrpad | /conf/evolutions/default/4.sql | UTF-8 | 5,848 | 3.203125 | 3 | [
"Apache-2.0"
] | permissive | # --- !Ups
INSERT INTO "ParsedResults" ("grammar", "lexer", "src", "code", "rule")
VALUES (
'
parser grammar MySQLParser;;
options
{ tokenVocab = MySQLLexer;; }
stat
: select_clause+
;;
schema_name
: ID
;;
select_clause
: SELECT column_list_clause ( FROM table_references )? ( where_clause )?... | true |
9762ad03daee6b9698442c916a50016d6c2a28b1 | SQL | monamak/LungCancerCharacterization | /inst/sql/sql_server/RegimensCategories.sql | UTF-8 | 2,441 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | WITH cte AS (SELECT DISTINCT *,
(case when regimen in ('erlotinib',
'gefitinib',
'afatinib',
'dacomitinib',
'osimertinib')
then 1 else 0 end) AS EGFR_tyrosine_kinase_inhibitors,
(ca... | true |
42a3cd72a144ef00cd1df1f9036254e6118f926f | SQL | w96352509/Web | /src/main/java/com/sql/book%.sql | UTF-8 | 307 | 3.328125 | 3 | [] | no_license | -- 計算每種書籍價值, 佔比
SELECT b."NAME",
sum(b.PRICE) as total,
SUM(b.PRICE * b.AMOUNT) as subtotal,
sum(b.PRICE) / sum(b.PRICE*b.AMOUNT),
SUM(b.PRICE * b.AMOUNT) as percent
FROM BOOK b
GROUP BY b."NAME";
-- 全部書籍總價值 ?
select SUM(b.PRICE * b.AMOUNT) as total from book b
| true |
6b83e81dfd9fc40ee54e350454d76334cc244623 | SQL | farismn/tarabulus | /resources/tarabulus/pg/user.sql | UTF-8 | 903 | 3.453125 | 3 | [] | no_license | -- :name- create-user! :<! :1
-- :doc create a new user and returns it
INSERT INTO
users (id, username, password, date_created, is_exist)
VALUES
(:id, :username, :password, :date-created, :exist?)
RETURNING
*
-- :name- find-user :? :1
-- :doc find user with matching username
SELECT * FROM
users
WHERE
userna... | true |
a28b70f771c3525f9667317a38a13f2fd56fbd90 | SQL | ayuputrii/bproduct | /produk.sql | UTF-8 | 1,355 | 2.671875 | 3 | [
"MIT"
] | permissive | # SQL-Front 5.1 (Build 4.16)
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */;
/*!40101 SET SQL_MODE='NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */;
/*!40103 SET SQL_NOTES='ON' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=0 */;
/*!400... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.