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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c1adee1c99c0d04a08c1e0d653b7a2f492f21d56 | SQL | weibanggang/schoolsystem | /学校管理系统/学校系统数据录入.sql | GB18030 | 43,823 | 2.609375 | 3 | [] | no_license | --1¥
insert into Dormitory
values('ܽ',200,'ͼƬ·','ʦ',50,5,500,600),
('ܰ',300,'ͼƬ·','ʦ',50,5,500,600),
('Է',300,'ͼƬ·','ʦ',40,5,450,600),
('ϧԷ',300,'ͼƬ·','ʦ',40,5,500,600),
('ܰԷ',400,'ͼƬ·','ʦ',40,5,500,600),
('˺',200,'ͼƬ·','ʦ',60,5,500,600),
('',200,'ͼƬ·','ʦ',60,5,500,600),
('Է',200,'ͼƬ·','ʦ',60,5,500,6... | true |
1f0f3483c048f19824a14dff7e371d27b6e917f4 | SQL | Nattawipa/Database-Systems | /week 2/assignment/U6188089_Schema01.sql | UTF-8 | 2,427 | 3.390625 | 3 | [] | no_license | CREATE TABLE Student
(
Student_ID int NOT NULL PRIMARY KEY,
Student_Firstname varchar(50) NOT NULL,
Student_Lastname varchar(50) NOT NULL,
Student_Address varchar(100),
Student_Birthday date,
Student_Email varchar(50) NOT NULL DEFAULT '@student.mahidol.ac.th',
Student_Phone varchar(10) NOT NULL,
... | true |
21abe02e5436255382649e1a6efa597b141441b0 | SQL | mroseweir/python-sql-assessment | /sql-skills.sql | UTF-8 | 2,157 | 4.40625 | 4 | [] | no_license | -- Artist Table
-- Add 3 new artists to the artist table using INSERT. (It’s already created.)
INSERT INTO artist ( name )
Values ('ODESZA'), ('Illenium'), ('GRiZ');
-- Select 5 artists in alphabetical order.
SELECT * FROM artist LIMIT 5;
-- Employee Table
-- List all employee first and last names only that live ... | true |
b327644fe496238bd488767ac5621cf99acc3974 | SQL | paljinderSingh13/rolepermisson | /ocrm_global_sub_modules (2).sql | UTF-8 | 11,524 | 2.609375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 23, 2017 at 09:22 AM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.0.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... | true |
76aab70c0892273d14b8f1c387cb5a89f1f8d48a | SQL | SushilChelsea/cypher-graph-database | /assign.sql | UTF-8 | 4,180 | 4.03125 | 4 | [] | no_license | -- Author: Sushil Pun
-- Loading club.csv file
LOAD CSV WITH HEADERS FROM ("file:///club.csv") AS row
create(n:Club {name:'row.club'};
--Loading result.csv file and making relationship between home and away club
LOAD CSV WITH HEADERS FROM ("file:///result.csv") AS row
match(a:Club{name:row.home}),(b:Club{name:row.awa... | true |
45ac73dc7271d1da7672807d1c6c2444f8d0ca0b | SQL | ProgHazem/Template-16-php3 | /books.sql | UTF-8 | 1,485 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Apr 08, 2018 at 12:06 AM
-- Server version: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
63568bd037a6ff306e5525cd10c553117004c65d | SQL | CassioRubens-CR/projects-developed-in-trybe | /Projects_Back_End/sd-06-mysql-one-for-all/desafio6.sql | UTF-8 | 1,416 | 3.921875 | 4 | [] | no_license | -- Tendo como base o valor dos planos e o plano que cada pessoa usuária cadastrada possui no banco, queremos algumas informações sobre o faturamento da empresa.
-- Crie uma VIEW chamada faturamento_atual que deve exibir quatro dados:
-- A primeira coluna deve ter o alias "faturamento_minimo" e exibir o menor valor de p... | true |
49d4c4630e6f0dc485e99c55463ac4c864af83b3 | SQL | aichouramine/openclassrooms-concevez-votre-site-web-avec-php-et-mysql | /tp-un-mini-chat/openclassrooms_concevez_votre_site_web_avec_php_et_mysql.sql | UTF-8 | 1,780 | 2.921875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Apr 26, 2017 at 07:55
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_... | true |
258d0f874d0746dca34aea78abe8ec1bc847124f | SQL | khj809/khjlji-wedding-invitation | /hasura/migrations/default/1659880280375_init/up.sql | UTF-8 | 1,854 | 3.421875 | 3 | [] | no_license | SET check_function_bodies = false;
CREATE TABLE public."Comments" (
id text DEFAULT gen_random_uuid() NOT NULL,
text text NOT NULL,
"userId" text NOT NULL,
"createdAt" timestamp with time zone DEFAULT now() NOT NULL
);
CREATE TABLE public."Gifts" (
id text DEFAULT gen_random_uuid() NOT NULL,
nam... | true |
9bf620c0980ebf57f13fb2c915d020a0a66dfec7 | SQL | spicerg1978/orapy | /sql/tablespaces.sql | UTF-8 | 1,886 | 3.40625 | 3 | [] | no_license | REM Script to list all tablespaces and its characteristics
REM Version 9i
REM
REM Gareth Spicer
REM
SET VERIFY OFF ECHO OFF PAGES 999 LINES 80 FEEDBACK OFF
TTITLE "ALL TABLESPACES INFORMATION"
COL TABLESPACE_NAME FORMAT A25
COL EXT_SIZE FORMAT A17 HEADING "EXT_SIZE I/N/M"
COL EXT_LIMITS FORMAT A18 HEADING "... | true |
08fe3fe71a449032cb234d8d35f9deb5bffd1702 | SQL | SaloValdez/POO_VENT_MODAL | /Extras/DatabaseCode.sql | UTF-8 | 611 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | create table if not exists profiles(
idProfile INT unsigned not null auto_increment,
profName VARCHAR(50) character set utf8 collate utf8_spanish_ci,
primary key(idProfile)
)engine=myisam character set utf8 collate utf8_spanish_ci;
create table if not exists users(
idUser INT unsigned not null auto_increment,
logUs... | true |
d0770bc3982497a3e582badeb82ba179761f5a22 | SQL | MmahdiM79/tutiter | /SQL queries/unfollow_procedure.sql | UTF-8 | 858 | 3.328125 | 3 | [] | no_license |
DELIMITER //
CREATE PROCEDURE `unfollow`(IN `username` VARCHAR(20), OUT res BOOL)
`scope`:
BEGIN
-- check given username
IF NOT usernameEXIST(username)
THEN
SELECT 'given username does not exist!' as `status`;
SELECT FALSE INTO res;
LEAVE scope;
END IF;
SET @`doer` = g... | true |
63fc77fee2fe4a30ff730b1be779e637cac75ed2 | SQL | Pulvex24/Minsa | /db/db.sql | UTF-8 | 4,517 | 3.609375 | 4 | [
"MIT"
] | permissive |
CREATE DATABASE MINSA;
use MINSA;
CREATE TABLE SECCIONES (
ID_SECCION int NOT NULL AUTO_INCREMENT PRIMARY KEY,
SECCION varchar(40) NOT NULL,
FECHA_CREACION DATE
);
CREATE TABLE ROLES (
ID_ROL int NOT NULL AUTO_INCREMENT PRIMARY KEY,
ID_SECCION int NOT NULL,
ROL varchar(25) NOT NULL,
FECHA_C... | true |
8892f8a36b0616173af31e94966d09e0737bdc66 | SQL | etassone1974/sql-challenge | /EmployeeSQL/query.sql | UTF-8 | 2,427 | 4.78125 | 5 | [] | no_license | -- Data Analysis
-- 1. List the following details of each employee: employee number, last name, first name, sex, and salary
SELECT e.emp_no, e.last_name, e.first_name, e.sex, s.salary
FROM employees as e
INNER JOIN salaries as s
ON e.emp_no = s.emp_no
ORDER BY e.emp_no;
-- 2. List first name, last name, and hire date... | true |
a39b2f730f292d0eefc5f82635eba15fd8629ce0 | SQL | Shuttle/Shuttle.Esb.Sql.Subscription | /Shuttle.Esb.Sql.Subscription/.scripts/Npgsql/SubscriptionManagerCreate.sql | UTF-8 | 337 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | CREATE TABLE public.subscriber_message_type
(
message_type character varying(250) NOT NULL,
inbox_work_queue_uri character varying(130) NOT NULL,
CONSTRAINT pk_subscriber_message_type PRIMARY KEY (message_type, inbox_work_queue_uri)
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.subscriber_message_type
O... | true |
4282487996f6f74ab0ebec4cf86d20e7b2cf39e1 | SQL | atuinsh/atuin | /atuin-client/migrations/20210422143411_create_history.sql | UTF-8 | 440 | 2.984375 | 3 | [
"MIT"
] | permissive | -- Add migration script here
create table if not exists history (
id text primary key,
timestamp integer not null,
duration integer not null,
exit integer not null,
command text not null,
cwd text not null,
session text not null,
hostname text not null,
unique(timestamp, cwd, command)
);
create index if not ... | true |
890ac9ff34406bd3a9b89b61e7291269a26487b6 | SQL | gurpreet19/ec198392_wht | /Database/configuration/03_02_headless_tool/Delta_WST/SourceViewDefinitions/V_TRANS_CONFIG.sql | UTF-8 | 1,913 | 3.171875 | 3 | [] | no_license | CREATE OR REPLACE FORCE EDITIONABLE VIEW "V_TRANS_CONFIG" ("MAPPING_NO", "TEMPLATE_NO", "TEMPLATE_CODE", "SOURCE_ID", "TAG_ID", "FROM_UNIT", "TO_UNIT", "DATA_CLASS", "ATTRIBUTE", "PK_ATTR_1", "PK_VAL_1", "PK_ATTR_2", "PK_VAL_2", "PK_ATTR_3", "PK_VAL_3", "PK_ATTR_4", "PK_VAL_4", "PK_ATTR_5", "PK_VAL_5", "PK_ATTR_6", "PK... | true |
2406693ad958737f9e884f46b813d2fd8d817357 | SQL | KAI10/Database-for-Restaurant-Management | /PL_SQL/LOGSFOOD.sql | UTF-8 | 931 | 3.078125 | 3 | [] | no_license | CREATE or REPLACE TRIGGER LOGSFOOD
before INSERT OR DELETE OR UPDATE OF "food_id", "food_price" ON "rFoodItem"
FOR each ROW
DECLARE
V_ChangeType CHAR(1);
v_id NUMBER;
old_price NUMBER;
new_price NUMBER;
BEGIN
IF INSERTING THEN
V_ChangeType := 'I';
v_id := :new."food_id";
INSERT into "rL... | true |
6dc8705590a3d0efcb967a79cf72048565ae4637 | SQL | ChanRong/job-plus | /data/sql/task_manage.sql | UTF-8 | 12,451 | 3.359375 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : task_manage
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 02/0... | true |
ef279090848fbdcae34476e3101b155f778eeed9 | SQL | mullerpaul/DBAstuff | /warehouse/resources/migration/iqprodm/2018Q1/iqn-39246_curr_conv_dim_seq.sql | UTF-8 | 590 | 3.296875 | 3 | [] | no_license | /* The purpose of this script is to drop and recreate the sequence, curr_conv_dim_seq, which is used for DM_CURRENCY_CONVERSION_RATES.
Doing this because the sequence is out of sync with the table. */
DECLARE
v_last_seq_id PLS_INTEGER;
BEGIN
EXECUTE IMMEDIATE 'DROP SEQUENCE curr_conv_dim_seq';
SELECT MAX(... | true |
a80063244a323dce8e5f0087f53ee4bc2c7a3899 | SQL | NetCrackerGroup/ProjectFolkTaxi | /src/main/resources/db/migration/V1.0__init_schema.sql | UTF-8 | 9,572 | 3.40625 | 3 | [] | no_license | CREATE TABLE public.Passenger_Rating (
User_ID BIGINT NOT NULL,
Average_Mark NUMERIC,
CONSTRAINT passenger_rating_pk PRIMARY KEY (User_ID)
);
CREATE TABLE public.Moderator (
Moderator_ID BIGINT NOT NULL,
FIO VARCHAR NOT NULL,
... | true |
ecdfd7a47acc029725e4459cf9b60645ef9f0bf0 | SQL | Dabendang/book | /src/main/docs/bookshop.sql | UTF-8 | 11,933 | 3.203125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50718
Source Host : localhost:3306
Source Database : bookshop
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2018-04-11 09:11:27
*/
SET FOREIGN_KEY_CHECKS=0;... | true |
d32d34102455e5c1364de6021bc1b96549292264 | SQL | JoLuMTavares/Videothek | /material/videothek4_dml.sql | UTF-8 | 679 | 3.296875 | 3 | [] | no_license |
-- Diese INSERT ist fuer die regisseur_filme Tabelle. Wenn ein film mit der Richtig regisseur findet, dann kopiert beide Schluessel (von filmen und regisseure Tabellen)
INSERT INTO `regisseur_filme` (regisseur_id, filme_id) SELECT regisseur.id, filmen.id FROM `regisseur` JOIN filmen WHERE regisseur.name LIKE CONCA... | true |
2269a45dd83dcc4756f617e040303f68f3456bc9 | SQL | tarim/Tarim.Api | /Sql files/database/add_name_pro.sql | UTF-8 | 568 | 2.84375 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `ADD_NAME`(IN name_ug_in VARCHAR(64),IN name_latin_in VARCHAR(64),IN origin_in ENUM('Uyghur', 'Arabic', 'Persian', 'Other'),
IN gender_in ENUM('male', 'female', 'unisex'),IN related_name_in VARCHAR(64),IN is_surname_in TINYINT,IN description_in VARCHAR(256), OUT id_out INT)
... | true |
238a0c7c6a2eaffdc6c7ff6ad82c3a5ddaf9fd5d | SQL | esau817/software_seguro | /Captcha/progra_Script.sql | UTF-8 | 422 | 2.765625 | 3 | [] | no_license | drop database if exists db_proyecto;
create database db_proyecto;
use db_proyecto;
-- Creación de tabla usuario, que será para todos los usuarios deudores
drop table if exists my_user;
create table my_user (id int not null auto_increment, username varchar(25),
password_1 varchar(25), fName varchar(50), pNumber varcha... | true |
5bf12f8b3a22aac3f76ccc66918b72c44522926c | SQL | Mahamudul-Hasan-Rafi/MathMaster | /SITE/TEST_START.sql | UTF-8 | 5,552 | 3.671875 | 4 | [] | no_license | SET SERVEROUTPUT ON;
SET VERIFY OFF;
DROP TABLE TEMP_MEMORY;
CREATE TABLE TEMP_MEMORY(
QUESTION_NO NUMBER,
ANSWERED VARCHAR2(15),
CORRECT_ANS VARCHAR2(15),
LEVEL_Q VARCHAR2(6),
QTP VARCHAR2(30),
MARKS NUMBER
);
CREATE OR REPLACE PACKAGE QA_PACKAGE AS
PROCEDURE DISPLAY_QUESTIONS(TP IN VARCHAR);
... | true |
c04d92029b4df94c27147d968eb4dc6fa637bfb2 | SQL | jwittbold/euro_cup_2016_mini_project | /sql_q13_sol.sql | UTF-8 | 292 | 3.671875 | 4 | [] | no_license | # 13. Find all the defenders who scored a goal for their teams
SELECT player_name, posi_to_play AS position, COUNT(posi_to_play) AS goals_scored
FROM player_mast AS pm
INNER JOIN goal_details AS gd
ON pm.player_id = gd.player_id
WHERE posi_to_play = 'DF'
GROUP BY player_name, posi_to_play
| true |
1008bb1ed63ccdd39769f9d5c5e3bd7be5d92f6f | SQL | selectSIFISO/SQL-Server-Management-Studio | /admin_via_dw.sql | UTF-8 | 2,386 | 4 | 4 | [] | no_license | SELECT
'Administration' [Basket Entries]
,us.[Surname] + ', ' + us.[FirstName] [User]
,ce.Id AS ClaimEventId
,ce.EventDate
,ce.NextContactDate
,il.FirstName AS InsuredLifeFirstName
,il.Surname AS InsuredLifeSurname
,ce.ClaimEventReferenceNumber_Number AS ReferenceNumber
FROM [DIM].[Claims_ClaimEvent]... | true |
e4dc044782fa6b40cb54e3af82c008ee54be88e1 | SQL | sanan1986/baseapplication | /src/src/database/db_build.sql | UTF-8 | 138,895 | 3.25 | 3 | [] | no_license |
--****************************************************************
--***************************************************************
--****************** DROP TABLES *************************
--**************************************************************
--**********************************************************... | true |
77169b852e2cad2386320094fa9ef43fc7d60c01 | SQL | SCloves/regras_associacao | /script_regras.sql | UTF-8 | 3,667 | 3.8125 | 4 | [] | no_license | SELECT * FROM pizzaria.pedidos;
ALTER TABLE pizzaria.pedidos DROP numero;
ALTER TABLE pizzaria.pedidos DROP cliente;
ALTER TABLE pizzaria.pedidos DROP telefone;
ALTER TABLE pizzaria.pedidos DROP endereco;
ALTER TABLE pizzaria.pedidos DROP valor_pizza;
ALTER TABLE pizzaria.pedidos DROP valor_entrega;
ALTER TABLE pizzar... | true |
24483b7c2374f8c6524ae17239785ee375eb86da | SQL | berezin31/apex-flowsforapex | /src/views/flow_instance_gateways_lov.sql | UTF-8 | 400 | 3.0625 | 3 | [
"MIT",
"LicenseRef-scancode-bpmn-io"
] | permissive | create or replace view flow_instance_gateways_lov
as
select obj.objt_id
, obj.objt_bpmn_id
, coalesce(obj.objt_name, obj.objt_bpmn_id) objt_name
, ins.prcs_id
from flow_instances_vw ins
join flow_objects obj
on obj.objt_dgrm_id = ins.dgrm_id
where obj.objt_tag_name in ('bpmn:excl... | true |
e702d1db9c15ff74f4a97794888bc666c34a96c5 | SQL | JanSwasthyaSahyog/jss-exports | /src/main/resources/sql/billed_and_paid_amount.sql | UTF-8 | 544 | 3.84375 | 4 | [] | no_license | select billed_amount.sum as billed_amount, paid_amount.sum paid_amount from
(select sum(amount_total) sum
from sale_order INNER JOIN res_partner on sale_order.partner_id = res_partner.id and res_partner.ref = :patient_id
where date(datetime_order) BETWEEN :start_date and :end_date) billed_amount,
(select sum(... | true |
af09afcb38e09075dd3bb61b6ef2be210d4c7b5a | SQL | kiyoshikondo/funkyjam.com | /public_html/mori/sql/mori_login_user.sql | UTF-8 | 225 | 2.78125 | 3 | [] | no_license | select m.*,od.payment from mori_user as m
inner join "order" as o
on m.order_no = o.order_no
inner join "order_desc" as od
on m.order_desc_no = od.order_desc_no
where m.account_no = '{$login_id}'
and m.delete_flg = '0'; | true |
e28e3493dacaf3ce9d3057478eaa8866c3c54d1c | SQL | ggelsinon/nodejsmysql | /bamazon.sql | UTF-8 | 384 | 3.421875 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products (
id INT NOT NULL AUTO_INCREMENT,
item_name VARCHAR(45) NULL,
price DECIMAL(10,2) NULL,
qty INT NULL,
PRIMARY KEY (id)
);
SELECT * FROM products;
INSERT INTO products (item_name, price, qty)
VALUES ("happiness", 1... | true |
1625fee4283b656f4c6f5461a9abff2910baf483 | SQL | mattyschell/stratum | /src/main/sql/definition/postgresql/schema-taxmap_read.sql | UTF-8 | 9,215 | 2.921875 | 3 | [
"CC0-1.0"
] | permissive | -- tax_lot_polygon
-- dropping community_district
-- may want to ditch more that are not maintained
create or replace view tax_lot_polygon
as select
objectid
,boro
,block
,lot
,bbl
,regular_lot_indicator
,number_lot_sides
,condo_flag
,reuc_flag
,air_rights_flag
,subterranean_fl... | true |
f035d298241e956d89cd9eacb762d20823f9b713 | SQL | Bvillevo/magazijnbeheer | /--SQL--/magazijn final.sql | UTF-8 | 11,103 | 2.921875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Gegenereerd op: 14 jun 2018 om 12:04
-- Serverversie: 10.1.26-MariaDB
-- PHP-versie: 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
1d7f3ef5ed182f4501c8242f23381e0d15b149f1 | SQL | jjordan00/NextGen | /NextGen SQL Scripts/Meaningful Use/MU pack.sql | UTF-8 | 1,481 | 3.453125 | 3 | [] | no_license | select pe.enc_timestamp AS ENC_DATE,pe.enc_id, p.last_name, p.first_name, pd.create_timestamp AS DATE_ON_MU, convert(datetime, co.txt_fintime) AS DATE_SHOULD_BE, pm.description, co.modify_timestamp from patient_encounter pe INNER JOIN
person p on pe.person_id = p.person_id INNER JOIN
provider_mstr pm on pe.render... | true |
0b8f5fe853c5c575637533cdf662b802d0d948f5 | SQL | harenas/meetup-ms2 | /mysql/gt-credito.sql | UTF-8 | 2,804 | 3.109375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.12, for osx10.11 (x86_64)
--
-- Host: localhost Database: gt-credito
-- ------------------------------------------------------
-- Server version 5.7.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... | true |
bf6ef4f6c3fa6e2a6189c40e764e574e10868001 | SQL | rjcjunior/TrabPBDUFF | /Exercicio 12.sql | UTF-8 | 490 | 3 | 3 | [] | no_license | update escola
set escola.codpessoa = (select p.codpessoa from professor p
where p.codpessoa = 29)
where escola.codpessoa = 25 and not exists(select p.codpessoa from professor p
where p.codpessoa not in (escola.codpessoa) and p.codpessoa = escola.codpessoa);
Delete from ministra_turma
where codpessoa = 25;
... | true |
e3385abf47dfb2a11a24c7cb7585e6d6def9c212 | SQL | TanYiXun/SQL-Server | /practicals/populate.sql | WINDOWS-1252 | 18,755 | 3.078125 | 3 | [] | no_license | SELECT * FROM Area
SELECT * FROM Branch
SELECT * FROM Choice
SELECT * FROM Item
SELECT * FROM Member
SELECT * FROM "Order"
SELECT * FROM OrderItem
SELECT * FROM OrderStatus
SELECT * FROM PizzaCrust
SELECT * FROM PizzaPrice
SELECT * FROM PizzaSize
SELECT * FROM PromoLine
SELECT * FROM PromoLineItem
SELECT * FROM Promoti... | true |
6d0bda345b91ada580e92f8fa2dd0337d0a59f3a | SQL | jaksonlima/Java-Spring-Boot-Ws-Back-End | /src/main/resources/data.sql | UTF-8 | 448 | 2.625 | 3 | [] | no_license | DROP TABLE IF EXISTS WS_PEDIDO_ITEM;
DROP TABLE IF EXISTS WS_PEDIDO;
CREATE TABLE WS_PEDIDO (
ID INT AUTO_INCREMENT PRIMARY KEY,
DH_CRIACAO TIMESTAMP,
RAZAO_SOCIAL VARCHAR(250),
CNPJ VARCHAR(250),
TELEFONE VARCHAR(250),
EMAIL VARCHAR(250)
);
CREATE TABLE WS_PEDIDO_ITEM (
ID INT AUTO_INCREMENT PRIMARY... | true |
85ff01e3a0aedca0e989f8714c371df4b67a689f | SQL | Sultenhest/adventureXP | /src/sql/adventureXP-w-data.sql | UTF-8 | 3,039 | 3.421875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 17, 2017 at 10:39 AM
-- Server version: 5.6.33
-- PHP Version: 5.6.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `adventureXP`
--
-- ----------------------------... | true |
25ae1aea0b62cef5c2f9e6f311e4b9d7102e934e | SQL | sergeymong/SQL | /MySQL/Learning SQL/8. Outer joins.sql | UTF-8 | 6,012 | 4.40625 | 4 | [] | no_license | # chapter 10
USE bank;
SELECT account_id, cust_id
FROM account;
SELECT a.account_id, c.cust_id
FROM account a INNER JOIN customer c
on a.cust_id = c.cust_id;
SELECT a.account_id, b.cust_id, b.name
FROM account a INNER JOIN business b ON a.cust_id = b.cust_id;
SELECT a.account_id, a.cust_id, b.name
FROM account a... | true |
6f5309716d8dcee999b5bec75693e5dbfbb630db | SQL | JMPennington/Capstone | /com.WanderingTurtle/com.WanderingTurtle.EventDatabase/dbo/Stored Procedures/spSelectBookingNumbers.sql | UTF-8 | 244 | 3.3125 | 3 | [] | no_license | CREATE PROCEDURE spSelectBookingNumbers
@ItemListID int
AS
BEGIN
select FirstName, LastName, Room, Quantity from HotelGuest join Booking on HotelGuest.HotelGuestID = Booking.GuestID where ItemListID = @ItemListID AND Booking.Active = 1
END | true |
1e0c4e57d77fff9b0336271e8e8ae68e984e722d | SQL | elizabeth1331/BD_GH | /s-15-fx-genera_csv.sql | UTF-8 | 1,586 | 3.1875 | 3 | [] | no_license | --@Autor: Jeremy García Meneses, MENDOZA DE LA VEGA DULCE ELIZABETH
--@Fecha creación: 03/02/2021
--@Descripción: FUNCIONES
connect gm_proy_admin/mg
create or replace function genera_csv(
p_directorio varchar2,
p_nombre_archivo varchar2,
p_usuario_id usuario.usuario_id%type,
p_nombre_usuario ... | true |
1d4a860a485535d7c32e0ddf96e15e8f70ae80f1 | SQL | amexaCree/storefront-backend-udacity | /migrations/sqls/20210930070901-order-products-table-up.sql | UTF-8 | 183 | 2.96875 | 3 | [
"MIT"
] | permissive | CREATE TABLE order_products (
id SERIAL PRIMARY KEY,
quantity integer,
order_id integer REFERENCES orders(id) NOT NULL,
product_id integer REFERENCES products(id) NOT NULL
);
| true |
47aa7de4227cf0955e5ae22f14c7d070d7b2ab2e | SQL | appgit/ibook-uyunshi | /uyunshi_mysql.sql | UTF-8 | 64,726 | 2.796875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : zhan-database
Source Server Version : 50616
Source Host : localhost:3306
Source Database : uyunshi_mysql
Target Server Type : MYSQL
Target Server Version : 50616
File Encoding : 65001
Date: 2015-05-23 22:14:58
*/
SET FOREIGN_KEY_CHECK... | true |
dfb613ffc4255dcf33636e4973e1726cde6d56ca | SQL | hudas/sys_arch_lab1 | /src/main/resources/h2database/createdb.sql | UTF-8 | 552 | 3.578125 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS client
(
id INTEGER NOT NULL IDENTITY,
name VARCHAR(50),
PRIMARY KEY (ID)
);
CREATE SEQUENCE IF NOT EXISTS client_sequence;
CREATE TABLE IF NOT EXISTS service
(
id INTEGER NOT NULL IDENTITY,
price BIGINT,
client_id BIGINT REFERENCES client(id),
PRIMARY KE... | true |
f22f446b78d56993ecf7d5a3dcc0f51f3a3f0f9f | SQL | Raimovanberkel/Kalender | /database/crud_system_sql.sql | UTF-8 | 598 | 3.25 | 3 | [] | no_license | SELECT DISTINCT birthdays.id, person, dag, tblmaand.maand as maand, jaar, maandoms FROM birthdays RIGHT JOIN tblmaand ON birthdays.maand=tblmaand.maand WHERE birthdays.id = 99 Order by maand, dag, person ASC;
Update birthdays set person="Raimo" where id = 99 ;
INSERT INTO birthdays (id,person, dag, maand, jaar) VA... | true |
1f00ef37eb0bcae6ca5c4c95a8aa455fffd70a1b | SQL | yeqingyang/wishweb | /sqldoc/t_group.sql | GB18030 | 499 | 2.671875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `t_group`
(
`gid` int(10) unsigned not null auto_increment comment 'id',
`gname` varchar(50) not null comment '',
`uid` int(10) unsigned not null comment 'uid',
`create_time` int(10) unsigned not null comment 'ʱ',
`status` int(10) unsigned not null default 0 comment '״̬0 1ɾ',
`va... | true |
5e2aeae3e8f3bba9bf8db673fd60cd839561ef6f | SQL | uzbekdev1/podbaby | /migrations/0014_add_user_triggers.down.sql | UTF-8 | 483 | 3.40625 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | ALTER TABLE bookmarks DROP CONSTRAINT bookmarks_user_id_fkey;
ALTER TABLE bookmarks ADD CONSTRAINT bookmarks_user_id_fkey FOREIGN KEY (user_id)
REFERENCES users (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE subscriptions DROP CONSTRAINT subscriptions_user_id_fkey;
ALTER TABLE sub... | true |
f308359c77a601c2aed94b9325e8a807a59740d7 | SQL | thedemodev/project-manager | /server/db/setup_scripts/project_members.join_table.sql | UTF-8 | 206 | 3.171875 | 3 | [] | no_license | -- Table that joins the project and it's members
CREATE TABLE project_members (
project_id INTEGER REFERENCES project(id) ON DELETE CASCADE,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE
); | true |
43d18b040a587db623c18fd4d9cc00dabe61dbee | SQL | regeldso/hrank | /SQL/Advanced Join/Projects.sql | UTF-8 | 2,362 | 4.5625 | 5 | [
"MIT"
] | permissive | --Select Only Dates, Ordered by Datefiff, StartDate
SELECT StartDate, EndDate
FROM
(
-- Get DateDiff of Alone Nodes
(SELECT StartDate, EndDate, ABS(DateDiff(day,StartDate, EndDate)) as DD
FROM
(
--SELECT Alone Nodes with JOIN
SELECT t1.Start_Date as StartDate, t... | true |
038b63029d46c8e7815126739a6c8302f7ee9af6 | SQL | eupherein/Bamazon-sql | /data.sql | UTF-8 | 744 | 2.921875 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon_db;
CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE items(
id INTEGER (11) AUTO_INCREMENT NOT NULL,
Name VARCHAR (45) NOT NULL,
Department VARCHAR (45) NOT NULL,
Price INTEGER (11) NOT NULL,
In_Stock INTEGER (11) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO items (Name... | true |
c47b8ecd3655fc9aa315cbf5e18e85e3336d5792 | SQL | hmanasi/toprecipe | /schema/ddl_h2.sql | UTF-8 | 2,803 | 3.34375 | 3 | [] | no_license |
alter table category
drop constraint FK_81thrbnb8c08gua7tvqj7xdqk;
alter table category_food_item
drop constraint FK_pjc47hvpkirbrjg8fv5hj6i53;
alter table category_food_item
drop constraint FK_57cujwjie5pbw98s9ub9ibmr3;
alter table food_item
drop constraint FK_g2... | true |
eb85a74ac791554cb9ef3c4923400edbb541b5db | SQL | aaiche/42-piscine_php | /piscine.a/day05/ex17/ex17.sql | UTF-8 | 161 | 2.703125 | 3 | [] | no_license | SELECT COUNT(*) AS 'nb_abo',
FLOOR(AVG(db_aaiche.abonnement.prix)) AS 'moy_abo',
(SUM(db_aaiche.abonnement.duree_abo) MOD 42) AS 'ft'
FROM db_aaiche.abonnement;
| true |
4f91b0d1384b604b3f082452826bbddf9b08bf0e | SQL | natyrrr/NYC-Restaurant-Analysis | /covid_restaurant_data/eater/eater_csv_data_schema.sql | UTF-8 | 10,317 | 2.796875 | 3 | [] | no_license | CREATE TABLE closed_restaurants (
Restaurant_id INT PRIMARY KEY,
Name VARCHAR(150),
Neighborhood VARCHAR(150),
Borough VARCHAR(150),
Zip_Code BIGINT,
Closed_As_Of_Date VARCHAR(100)
);
INSERT INTO closed_restaurants
(Restaurant_id,Name,Neighborhood,Borough,Zip_Code,Closed_As_Of_Date)
VALUES
(1,'Awkward Scone','Bu... | true |
ba555bcfa2ec5eb0f38ecf8a51a004e7519ee1b8 | SQL | vsolv/BigFin | /Bigflow/DB/SPS/FA/sp_FALocation_Set.sql | UTF-8 | 4,389 | 3.109375 | 3 | [] | no_license | CREATE DEFINER=`developer`@`%` PROCEDURE `sp_FALocation_Set`(IN `ls_Action` varchar(32),IN `ls_Type` varchar(32),
IN `ls_Sub_Type` varchar(32),IN `lj_Details` json,IN `lj_Classification` json,
IN `ls_Createby` varchar(32),OUT `Message` varchar(1024))
sp_FALocation_Set:BEGIN
#### Bala Oct 15 2019
declare Query_Insert va... | true |
ac0f3ac9a605c9676d8a8cffecb73373c776753e | SQL | Artyonnn/Lab6 | /BDLAB6/scrip3.sql | UTF-8 | 2,272 | 3.09375 | 3 | [] | no_license | create or replace procedure deporeti(
p_cod_sucursal transadeporeti.COD_SUCURSAL%type,
p_id_transadeporeti transadeporeti.id_transadeporeti%type,
p_id_c transadeporeti.id_C%type,
p_tipo_de_ahorro transadeporeti.tipo_de_ahorro%type,
p_tipo_de_transaccion transadeporeti.tipo_de_transaccion%type,
... | true |
5dfc077c91fdaab4c806ee11c2b37cb41224f36b | SQL | Macslack/record_shop | /db/record_shop.sql | UTF-8 | 360 | 3.1875 | 3 | [] | no_license |
DROP TABLE albums;
DROP TABLE artists;
CREATE TABLE artists
(
id SERIAL8 primary key,
name VARCHAR(255) not null
);
CREATE TABLE albums
(
id SERIAL8 primary key,
name VARCHAR(255) not null,
quantity INT8,
artist_id INT8 references artists(id) ON DELETE CASCADE,
buy_price INT8,
sell_price INT8,
ur... | true |
a63ea3429fa043443549b3d5cf4666a1919dc7e3 | SQL | angusho321/Azure-test | /GroupPay/dbupdate.20190426.sql | UTF-8 | 699 | 3.109375 | 3 | [] | no_license | drop table if exists `commission_ratio`;
create table `commission_ratio` (
`lbound` int not null,
`ubound` int not null,
`ratio` double not null,
constraint `pk_commission_ratio` primary key (`lbound`, `ubound`)
) engine=InnoDB default charset=utf8mb4;
drop table if exists `agency_commission`;
create ... | true |
37dc666ec46e3e08f4420f1b40fa815ed5f8dc37 | SQL | HaekyungPark/SQL | /SQL/natural_outerJoin.sql | UTF-8 | 1,006 | 4.375 | 4 | [] | no_license | -- ANSI Join SQL문 (1991 Syntax)
--natural join 테이블의 칼럼 이름이 같으면 자동으로 조인이 걸린다.
--조인 대상 테이블에 같은 칼럼이 있는 경우
select *
from employees a
natural join departments b;
-- on a.department_id = b.department_id
-- and a.manager_id = b.mamager_id
--natural join 은 위 두 문장 생략
select count(*)
from employees a
... | true |
47df60195c26e7437a6fd8c3c8801f4357ebbbdb | SQL | nsky1618/safeLogin | /sql/users.sql | UTF-8 | 2,371 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 21, 2020 at 02:06 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
d4d407402306d8416c0a9382c18f8e3b3a083de0 | SQL | tommy8137/importwsdepro | /backEnd/db-migrate/migrates/sqls/20200529020547-metal-dt-aio-voip-server-painting-up.sql | UTF-8 | 122,708 | 3.5 | 4 | [] | no_license | CREATE TABLE if not exists formula.metal_paint_color (
id uuid not null DEFAULT uuid_generate_v1(),
color_name varchar(200) not null,
remark varchar(400) null,
create_time timestamptz NOT NULL DEFAULT now(),
disable_time timestamptz NULL,
CONSTRAINT metal_paint_color_pk PRIMARY KEY (id),
CONSTRAINT m... | true |
3432ee11f52932cc3c4a21ea3eb2f53a93fd6c94 | SQL | andreaczhang/mimic | /Johnson2017/queryJcode/cohort-aki/cohort_aki.sql | UTF-8 | 811 | 3.640625 | 4 | [] | no_license | -- CELI AKI
-- inclusion_only_mimicii
-- inclusion_over_18
-- inclusion_aki_icd9
-- hospital_expire_flag
SELECT
co.subject_id, co.hadm_id, co.icustay_id
, ceil(extract(epoch FROM (co.outtime - co.intime))/60.0/60.0) as dischtime_hours
, ceil(extract(epoch FROM (adm.deathtime - co.intime))/60.0/60.0) as d... | true |
ed844e85635fc488098f607e3a9fc60188f386c5 | SQL | FreddieAbad/100-Days-Of-Code | /Dia 16/crud-mysql/src/database/db.sql | UTF-8 | 324 | 3.0625 | 3 | [] | no_license | -- creating db
CREATE DATABASE crudnodejsmysql;
--using db
use crudnodejsmysql;
--tables
create table customer(
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
address VARCHAR(100) NOT NULL,
phone VARCHAR(15)
);
--SHOW TABLES
SHOW TABLES;
--TO DESCRIBE TABLE
DESCRIBE CUSTO... | true |
0eb3cc2ae0c25d21b189f494a52ff6080a7e8f2a | SQL | feleHaile/Data-Warehousing-for-Business-Intelligence-Specialization | /Course 1 Database Management Essentials/Course1Module04Assignment/additional probl/OrderProbl.sql | UTF-8 | 870 | 4.15625 | 4 | [] | no_license | SELECT CustNo, CustFirstName, CustLastName, CustBal -- 1
FROM Customer;
SELECT CustNo, CustFirstName, CustLastName, CustBal -- 2
FROM Customer
WHERE CustState = 'CO';
SELECT * -- 3
FROM Product
WHERE ProdPrice > 50
ORDER BY ProdMfg, ProdName;
SELECT CustNo, CustFirstName, CustLastName, CustCity, CustBal -- 4
FROM C... | true |
c600bc2d793b48a0bda67537f8a8d131cf43cacd | SQL | rajaram-parab/OracleTutorial | /CollectionMethodPRiorAndNext_tut63.sql | UTF-8 | 541 | 2.703125 | 3 | [] | no_license | DECLARE
TYPE nested_table is table of varchar2(20);
var_nt nested_table := nested_table(9,18,27,36,45,54,63,72,81,90);
BEGIN
DBMS_OUTPUT.PUT_LINE('Value before 3rd Index '|| var_nt.PRIOR(3));
DBMS_OUTPUT.PUT_LINE('Value before 3rd Index '|| var_nt(var_nt.PRIOR(3)));
END;
DECLARE
TYPE nested_table is table of varchar... | true |
543691e0121077ad9ca4ef8ec4fc0566c50699f5 | SQL | klayne1129/MVC-persistent | /queries.sql | UTF-8 | 241 | 2.765625 | 3 | [] | no_license | ## Part 1: Test it with SQL
SELECT *
FROM job
## Part 2: Test it with SQL
SELECT location
FROM employer
WHERE location="St. Louis"
## Part 3: Test it with SQL
DELETE FROM job WHERE id=5;
## Part 4: Test it with SQL
| true |
80982153fd76d87d0644196287a42ec6bfd25fd2 | SQL | kamshory/Point-Of-Sale | /database/point-of-sale.sql | UTF-8 | 15,801 | 3.59375 | 4 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Sun Mar 29 16:18:08 2020
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... | true |
d2e21349acfdc2f80cd2a08864786d5827c6281b | SQL | JorgePaladines/SampleMovie | /samplemovie.sql | UTF-8 | 15,416 | 2.8125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 17, 2019 at 11:51 PM
-- Server version: 5.7.24-0ubuntu0.16.04.1
-- PHP Version: 7.2.13-1+ubuntu16.04.1+deb.sury.org+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!... | true |
79d330f5071b6242f74a29b2f57f0eed2def17af | SQL | matthew-giannola/Database-3630-Project | /DBProjectSQLFiles/DBProject.sql | UTF-8 | 17,071 | 3.46875 | 3 | [] | no_license | -- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SU... | true |
beb639f32d05eecce88a51e91e11da6c6093b060 | SQL | n-dusan/wroom | /agent-monolith/src/main/resources/data.sql | UTF-8 | 14,897 | 3.09375 | 3 | [
"MIT"
] | permissive | -- Baza nije create-drop (znaci jednom kada nesto insertujete ovde, ostaje u bazi cak i po ponovnom pokretanju aplikacije)
-- U create-drop rezimu, ukoliko sql skripta ponovo insertuje već unete vrednosti (MySQL ume da ne dropuje i redove unutar tabela)
-- onda dodajte delete na tabelu koju želite da očistite, time se ... | true |
e1ea817ae261d805d546eac601c9a1c0caea64ef | SQL | marwan1023/Udacity-Data-foundation-Nanodegree | /project 3/chinook-preetikrp-master/chinook-preetikrp-master/line_item_track_artist.sql | UTF-8 | 219 | 3.03125 | 3 | [] | no_license | select track.name, track.composer, invoiceLine.invoiceLineId, invoiceLine.invoiceId,
InvoiceLine.TrackId, InvoiceLine.UnitPrice, InvoiceLine.Quantity
from track, invoiceLine
where track.trackId = invoiceLine.trackId
| true |
8b8a123625364ee06e20c1f5dcc8df56ff2a9f7b | SQL | HenintsoaAdri/SMORL | /script.sql | UTF-8 | 2,794 | 3.921875 | 4 | [] | no_license | CREATE VIEW CONGRESDETAILVIEW AS
SELECT C.IDCONGRES, C.NOMCONGRES, C.DATECONGRES,
D.*
FROM CONGRES C
LEFT JOIN LISTDETAILCONGRES D
ON C.IDCONGRES = D.IDCONGRES;
CREATE VIEW SOMMEPAYECOTISATION AS
SELECT M.*,
C.*,
SUM(P.MONTANT) AS MONTANTPAYE
FROM COTISATION C
JOIN PAIEMENTCOTISATION P
ON P.IDCOTISATION = C... | true |
16408b00a08f9097ee3e7039bc9503235151bd71 | SQL | JosepLajara/Personal | /Base datos/B5A8/10.sql | UTF-8 | 171 | 3.375 | 3 | [] | no_license | select equipo.nombre, avg(jugador.salario) as Media_salario
from equipo join jugador
on equipo.id_equipo=jugador.equipo
group by jugador.equipo
having Media_salario>50000 | true |
9f8bd0642a7501a44adfdd4d7aabbc57ca9bc8c7 | SQL | williamPozo/cp_WilliamPozo | /tempro20_conpdt.sql | UTF-8 | 3,880 | 2.78125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `tempro20` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `tempro20`;
-- MySQL dump 10.13 Distrib 5.5.16, for Win32 (x86)
--
-- Host: 192.168.1.210 Database: tempro20
-- ------------------------------------------------------
-- Server version 5.5.62-0ubuntu0.14.04.1
/*!40101 SET @OLD_... | true |
6101a499a4d7e8008faccab0ddcfb4699a387be0 | SQL | Shelog/ddarchiv | /ext_tables.sql | UTF-8 | 5,518 | 3 | 3 | [] | no_license | #
# Table structure for table 'tx_ddarchiv_domain_model_bestand'
#
CREATE TABLE tx_ddarchiv_domain_model_bestand (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
description text NOT NULL,
provenience text NOT NULL,
year_from int(4) DEFAULT '0' NOT ... | true |
272c3fa18be1c6e0b755104177eb0be44129a3a7 | SQL | IulioCesars/TwickyTube | /DB - Dumps/ObtenerVideosPopulares.sql | UTF-8 | 237 | 2.515625 | 3 | [] | no_license | drop procedure if exists ObtenerVideosPopulares;
delimiter $%
CREATE DEFINER=`twickytube`@`%` PROCEDURE `ObtenerVideosPopulares`(
in top int
)
BEGIN
select * from video
where id_video > 0
order by vistas desc limit top;
END
$% | true |
56a577f08bd63d83bc64f376a98a5917c8d8063c | SQL | RagunathanMV/Testdata | /oracle/default/TS21/TS21_01.sql | UTF-8 | 526 | 3.59375 | 4 | [] | no_license | CREATE TABLE TS21_01.SUPPLIERS7
(
SUPPLIER_ID NUMBER(10),
SUPPLIER_NAME VARCHAR2(20),
SUPPLIER_ADDRESS VARCHAR2(20)
);
CREATE TABLE TS21_01.ORDERS2
(
ORDER_NUMBER NUMBER(10),
SUPPLIER_ID NUMBER(10),
CITY VARCHAR2(20)
);
CREATE OR REPLACE PROCEDURE TS21_01.CREATE_TAB_SUP_ORD_LEFT
IS
BEGIN
CREATE TABLE TS21_01.SUP_OR... | true |
6492e1c46a9734d6066373a232382ccc2f2ad0af | SQL | ervinpepic/citrus_system | /db_citrus_system.sql | UTF-8 | 2,674 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Mar 11, 2020 at 12:31 AM
-- Server version: 5.7.26
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `citrus_system`
--
-- --------------------... | true |
78b4ab7ab1f4ec52ae0c9e6458920dfe042f34d9 | SQL | khalilAlsulaimani/MySql_practical | /hotel edits.sql | UTF-8 | 671 | 3.265625 | 3 | [] | no_license | select * from hotel where hotel_id='ch01';
alter table hotel add COLUMN hotel_manager varchar(20);
select * from hotel;
alter table hotel
drop column hotel_manager;
select * from hotel;
alter table hotel add column receptionist varchar(20);
UPDATE `hoteldb`.`hotel` SET `receptionist` = 'mark' WHERE (`hotel_id` =... | true |
adc82ed5cc3708e1f7834a43c29ee0c5d32652d2 | SQL | mbilalbark/degirmen-api | /degirmen.sql | UTF-8 | 5,820 | 3.015625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 05 Tem 2018, 00:43:12
-- Sunucu sürümü: 5.7.17
-- PHP Sürümü: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... | true |
17d6b63d4e89f2f77c9c18395826ddf00ed17266 | SQL | annaymj/SQL | /TripsAndUsers.sql | UTF-8 | 3,693 | 4.40625 | 4 | [] | no_license | The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users table.
Status is an ENUM type of (‘completed’, ‘cancelled_by_driver’, ‘cancelled_by_client’).
+----+-----------+-----------+---------+--------------------+----------+
|... | true |
b3302bd1ef57e705235522be7aab2bd3cbff2296 | SQL | HeenaSisodia/SDETtraining | /SQL/SQLQueries_tillActivity6.sql | UTF-8 | 1,956 | 4.0625 | 4 | [] | no_license | use employees;
create database sdet4_heena;
use sdet4_heena;
CREATE TABLE salesman (
salesman_id int primary key,
name varchar(20),
city varchar(20),
comission int
);
describe salesman;
Insert into salesman
values (5001, 'James Hoog', 'New York', 15);
Select * from salesman;
Insert into s... | true |
71613c36a1e0f095c018ef9bf404e892e89aa2ac | SQL | hillangat/Hunter | /src/main/webapp/resources/dms/GET_RGN_LVL_NMS_FOR_CNTIES.sql | UTF-8 | 3,273 | 3.34375 | 3 | [] | no_license | create or replace PROCEDURE GET_RGN_LVL_NMS_FOR_CNTIES
(
COUNTRY_NAM IN VARCHAR2 DEFAULT null ,
CMM_SPRTD_CNTIS IN VARCHAR2 DEFAULT null,
OUTPUT_REGION_NAME OUT VARCHAR2
) AS
l_count binary_integer;
l_array dbms_utility.lname_array;
curr_county cnty.CNTY_NAM%TYPE := null;
curr_constituency CNSTTNCY... | true |
c42885e376bbc0d9273ea1e4396845f3de89710e | SQL | siposalex24/eCabgine | /app/sql/ecabgine1.sql | UTF-8 | 12,563 | 3.03125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Feb 24, 2021 at 08:24 PM
-- Server version: 5.7.31
-- PHP Version: 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
5df51e3668125b977ee7514d1ffdc6f51031cd12 | SQL | FishMage/Postgres | /q2.sql | UTF-8 | 743 | 3.203125 | 3 | [] | no_license | --q2a
ALTER TABLE inproceedings
Add column Area text;
--q2b
--database
update inproceedings
set Area = 'Database'
where booktitle = 'SIGMOD Conference' or booktitle = 'VLDB' or booktitle = 'ICDE' or booktitle = 'PODS';
--Theory
update inproceedings
set Area = 'Theory'
where booktitle = 'STOC' or booktitle = 'SODA' o... | true |
f887fbda34bd4064232378e97a36879eadc67f71 | SQL | tantiancai/php-handwriting | /资料/数据库.sql | UTF-8 | 4,637 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2009 年 10 月 08 日 04:19
-- 服务器版本: 5.1.36
-- PHP 版本: 5.3.0
SET character_set_connection=latin1, character_set_results=latin1, character_set_client=binary;
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- 数据库: `h... | true |
b0ac89c1d3ee976570ebf049e73d36ee0362c19b | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/01354_tuple_low_cardinality_array_mapped_bug.sql | UTF-8 | 440 | 3.28125 | 3 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | SELECT arrayExists(x -> ((x.1) = 'pattern'), cast([tuple('a', 1)] as Array(Tuple(LowCardinality(String), UInt8))));
DROP TABLE IF EXISTS table;
CREATE TABLE table (id Int32, values Array(Tuple(LowCardinality(String), Int32)), date Date) ENGINE MergeTree() PARTITION BY toYYYYMM(date) ORDER BY (id, date);
SELECT count(... | true |
b81940b50ab08c0de3afac0e75d175d8caf49372 | SQL | GerichoJB/Stuff | /Database Exercise/transactions.sql | UTF-8 | 381 | 2.65625 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `Qgiv`.`transactions` (
`idtransactions` INT(11) NOT NULL AUTO_INCREMENT,
`amount` VARCHAR(45) NOT NULL,
`status` VARCHAR(45) NOT NULL,
`payment_type` VARCHAR(45) NOT NULL,
`user_email` VARCHAR(45) NOT NULL,
`timestamp` VARCHAR(45) NOT NULL,
PRIMARY KEY (`idtransactions`))
ENGIN... | true |
506b0e311a7bf42bc308e50b2d7ee792c446c505 | SQL | leonards-ar/LaborGuru_SPM | /docs/design/mysql-initial-data.sql | UTF-8 | 5,655 | 3.078125 | 3 | [] | no_license | -- Creation
--create database spm;
--GRANT ALL ON spm.* TO 'spm'@'localhost' IDENTIFIED BY 'java1234';
--GRANT ALL ON spm.* TO 'spm'@'%' IDENTIFIED BY 'java1234';
--FLUSH PRIVILEGES;
-- Delete
delete from tbl_profiles_permissions;
delete from tbl_users_profiles;
delete from tbl_profiles;
delete from tbl_menu... | true |
e8a9bc65c050106d02032ac09151ced3b91d49a6 | SQL | go2suresh1979/MyRepo | /Personal/Solaris/main/mgmt_sv/oracle/sql/old/createTomfClientConfig.sql | UTF-8 | 1,093 | 2.921875 | 3 | [] | no_license | /*
**---------------------------------------------------------------------------#
**
** Component: $Id: //ovo/main/mgmt_sv/oracle/sql/createTomfClientConfig.sql#1 $
** Author: Tze Ken Soh
** Copyright: Totality Corporation, 2005. All Rights Reserved.
** Description: This script add TOMF client config table fo... | true |
f4c7c9ee590034f36487bf7681378f485d35d9af | SQL | C-E-Campbell/sql-2-mini | /mini.sql | UTF-8 | 2,710 | 4.28125 | 4 | [] | no_license | CREATE TABLE movie(
movie_id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
media_type_id INTEGER
FOREIGN KEY(media_type_id) REFRENCES media_type(media_type_id)
)
-- shortcut
CREATE TABLE movie(
movie_id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
media_type_id INTEGER REFERENCES media_type(media_ty... | true |
e9b9426fe9dc4ec441cb1bb6f1b738c29b0c41ee | SQL | aleksei-khitev/knowledge_base | /1. Tech Skills/1. Языки программирования/2. Java Frameworks/1. Spring/examples/spring/src/main/resources/spring/transaction/ships.sql | UTF-8 | 22,346 | 2.578125 | 3 | [] | no_license | insert into ship(id, type, ship_class, producer, cost, autonomy, link) values(1, 'Корвет', 'СР90 Убийца', 'Corellian Engineering Corporation', 2500000, 365, 'http://starforge.info/rebellion-ships/cr90-corellian-corvette/');
insert into ship_size(ship_id, ship_length, ship_width, ship_height) values(1, 140, 59, 17);
ins... | true |
ae96251a9bc26693468601775f9f4292ac011362 | SQL | ItaloRamillys/SpotPer | /Criacao SpotPer.sql | UTF-8 | 4,053 | 3.71875 | 4 | [] | no_license | --create database SpotPer
/* SpotPer Logico: */
--USE SpotPer
CREATE TABLE GRAVADORA (
CODIGO_GRAVADORA INTEGER not null,
CONSTRAINT PK_COD_GRAV PRIMARY KEY (CODIGO_GRAVADORA),
NOME VARCHAR(30) not null,
PAIS VARCHAR(30) NOT NULL,
ESTADO VARCHAR(30) NOT NULL,
CIDADE VARCHAR(30) NOT NULL,
RUA VARCHAR(... | true |
92d04fc0cd5f6ccaa581b597ba278e07b3024482 | SQL | orlinwilliams/loginSession | /data/data.sql | UTF-8 | 619 | 2.6875 | 3 | [] | no_license | create or replace database DBUser;
use DBUser;
create table User (
idUser int auto_increment primary key,
nameUser varchar(45) not null,
passwordUser text not null,
idUserTypeFk int not null
);
create table UserType(
idUserType int auto_increment primary key,
typeUser varchar(45) n... | true |
1c4b1ca4735d2ab406e6d0eca1c320fe156c7487 | SQL | hungds99/Fahasa-Clone | /petdb.sql | UTF-8 | 5,676 | 3.734375 | 4 | [] | no_license | CREATE SCHEMA `petdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE `petdb`;
-- Category
CREATE TABLE `category` (
id INT AUTO_INCREMENT,
category_name NVARCHAR(100),
title NVARCHAR(100),
category_breadcrumb NVARCHAR(255),
keyword NVARCHAR(255),
descriptions NVARCHAR(255),
parent... | true |
417017ec0a8f955147d7819a441173cdf503efc7 | SQL | kevinsqi/graphql-postgres-express-demo | /setup_database.sql | UTF-8 | 943 | 3.40625 | 3 | [] | no_license | DROP DATABASE IF EXISTS graphql_postgres_express_demo;
CREATE DATABASE graphql_postgres_express_demo;
\c graphql_postgres_express_demo;
CREATE TABLE posts (
id INTEGER PRIMARY KEY,
title TEXT
);
CREATE TABLE comments (
id SERIAL PRIMARY KEY,
post_id INTEGER,
user_id INTEGER,
te... | true |
cc8a64e6a194d7ec6c9574285b50446c69647e9f | SQL | sunnynewlife/mamiwin | /db/magtadmin_myadmin_user.sql | UTF-8 | 3,156 | 3.140625 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `magtadmin` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `magtadmin`;
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
--
-- Host: localhost Database: magtadmin
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_S... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.