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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5fd3e09620de82c65b9b828193dba9f68852cc64 | SQL | hannoeru/student-card-backend | /prisma/migrations/20201228135227_remove_group_and_member/migration.sql | UTF-8 | 684 | 3.421875 | 3 | [
"MIT"
] | permissive | /*
Warnings:
- You are about to drop the `groups` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `members` table. If the table is not empty, all the data it contains will be lost.
*/
-- CreateEnum
CREATE TYPE "Role" AS ENUM ('STUDENT', 'TEACHER', 'ADMIN');
... | true |
bca93a3a57b542289252222be3834428f93c6c0c | SQL | savent404/UNSW-postsql-practice | /proj1.sql | UTF-8 | 8,252 | 4.21875 | 4 | [] | no_license | -- comp9311 19T3 Project 1
--
-- MyMyUNSW Solutions
-- Q1:
create or replace view Q1(unswid, longname)
as
select r.unswid,r.longname
from Rooms r join room_facilities f
on (r.id=f.room and f.facility=19)
;
-- Q2:
create or replace view Q2(unswid,name)
as
select distinct p.unswid,p.name
from People p, staff... | true |
f1b43c99ba36c74d827c9f54163a51a307947869 | SQL | Mspivey100/Homework | /SQL/table_creation.sql | UTF-8 | 679 | 3.390625 | 3 | [] | no_license | CREATE TABLE departments (
dept_no VARCHAR(5) NOT NULL PRIMARY KEY,
dept_name VARCHAR(60) NOT NULL
);
CREATE TABLE dept_emp (
emp_no INT NOT NULL,
dept_no VARCHAR(5) NOT NULL,
from_date date,
to_date date
);
CREATE TABLE dept_manager(
dept_no VARCHAR(5) NOT NULL,
emp_no INT NOT NULL,
from_date date,
to_date... | true |
c20daa0caa8eb1b1380deb0958e542c1f20f2466 | SQL | DeyanDanailov/MS-SQL-Server | /ExamPreparation/Databases MSSQL Server Exam - 28 Jun 2020/11.Get Colonists Count.sql | UTF-8 | 409 | 3.578125 | 4 | [
"MIT"
] | permissive | CREATE FUNCTION dbo.udf_GetColonistsCount(@PlanetName VARCHAR (30))
RETURNS INT
AS
BEGIN
RETURN
(SELECT COUNT(c.Id) AS [Count]
FROM Colonists c
JOIN TravelCards t ON t.ColonistId = c.Id
JOIN Journeys j ON j.Id = t.JourneyId
JOIN Spaceports s ON s.Id = j.DestinationSpaceportId
JOIN Planets P ON p.Id = s.Plan... | true |
ef5ce1516d83b01741f455a60df5f24a069f55a0 | SQL | weslley543/TCON | /config/bancoDoProjeto.sql | UTF-8 | 1,445 | 3.53125 | 4 | [] | no_license | create database TCON;
create table usuario(
cod_usuario INT PRIMARY KEY AUTO_INCREMENT,
nome_usuario varchar(100) NOT NULL,
email varchar(100),
senha varchar(60) NOT NULL,
tipo_usuario boolean NOT NULL,
cpf_usuario varchar(14)NOT NULL,
rg_usuario varchar (20),
endereco_usuario varchar(8... | true |
0209e2a60bd8f5b56827c915d3b97ea20eff143c | SQL | JustUtahCoders/comunidades-unidas-internal | /backend/apis/users/list-users.sql | UTF-8 | 205 | 3.109375 | 3 | [
"MIT"
] | permissive | SELECT id, firstName, lastName, email, accessLevel, JSON_ARRAYAGG(userPermissions.permission) permissions
FROM
users
LEFT JOIN
userPermissions ON userPermissions.userId = users.id
GROUP BY users.id
; | true |
9d438e8f0f601a5b0d80639d5187731943d555a7 | SQL | TheDude1656/burger | /db/schema.sql | UTF-8 | 319 | 2.984375 | 3 | [
"MIT"
] | permissive | DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers (
id INT AUTO_INCREMENT NOT NULL,
burger_name VARCHAR(99) NOT NULL,
devoured BOOLEAN DEFAULT false,
`date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
SELECT * FROM burgers; | true |
1680b9173821238ee7373fa4a5b06bb709a64951 | SQL | GabrielDraxton/Gabes_github.io | /SOLUTIONS LAB SQL 05 (Outer Joins, Self Joins).sql | UTF-8 | 7,616 | 4.90625 | 5 | [] | no_license | #SQL LAB 05: OUTER JOINS, SELF JOINS
use salesshort;
#Q1: Show all customers (customerNumber and customerName) without any orders.
-- Returns 24 rows (i.e., a list of 24 customers) that do not have any associated orders per the orders table.
select c.customernumber, customername from customers c
left join orders o on... | true |
f5a8c645fdbdf05ef80a2b26e806edfcf5f1d79d | SQL | ivyhjk/oauth2-phalcon | /migrations/MySQL/oauth_user_scopes.sql | UTF-8 | 425 | 3.09375 | 3 | [] | no_license | DROP TABLE IF EXISTS `oauth_user_scopes`;
CREATE TABLE IF NOT EXISTS `oauth_user_scopes` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`scope_id` varchar(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `oauth_user_scopes`
ADD PRIMARY KEY (`id`),
ADD KEY `user_id` (`user_id`),
ADD KEY ... | true |
ef1cb6eb13e96ff03b4913528390e96f67ac5d13 | SQL | nss-evening-cohort-3/learning-sql-individual-assignment-davidcramb | /SQLQuery2.sql | UTF-8 | 218 | 2.875 | 3 | [] | no_license | --SQL Version
SELECT CONCAT (FirstName, ' ', LastName) FROM Customer WHERE Customer.Country = 'Brazil';
--SQLite Version
SELECT FirstName || ' ' || LastName FROM Customer WHERE Customer.Country = 'Brazil';
| true |
50381e8b139a05406ad2bba07ecfae485b0b9a69 | SQL | MrBloodness/hrm | /db/structure.sql | UTF-8 | 7,981 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.26, for Linux (x86_64)
--
-- Host: localhost Database: hrm_dev
-- ------------------------------------------------------
-- Server version 5.7.26-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... | true |
0e671dd5c274c6a482f33a409a3994ee41e8c4fc | SQL | LoginovAS/ConNet | /sql/connet_test_data.sql | UTF-8 | 3,120 | 3.4375 | 3 | [] | no_license | -- Данные основных таблиц
-- nodes
INSERT INTO `nodes` (`node_id`, `node_name`, `region`, `street`, `building`) VALUES
(2, 'TestNode1', 'Санкт-Петербург', 'Невский проспект', '11 лит А'),
(3, 'TestNode2', 'Санкт-Петербург', 'Есенина', '4'),
(4, 'TestNode3', 'Санкт-Петербург', 'Композиторов', '15к1'),
(5, 'TestNode... | true |
094f0dcbea6f82034fc8315716849aa886a92fd9 | SQL | paullewallencom/oracle-apex-978-1-7821-7967-2 | /_src/Chapter 5/9672_05_txt/render_setcolor.sql | UTF-8 | 1,007 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | /*************************************************************
** Name: render_setcolor.sql **
** Author: M. van der Plas **
** Date: 26th October 2010 **
** This script dynamically changes the color of an element **
... | true |
a56c3dc4cfa7e191fef87428ce0f6511cfe2235e | SQL | HarshDivecha/sql_coding_questions | /case_udacity.sql | UTF-8 | 2,957 | 4.8125 | 5 | [] | no_license | -- Write a query to display the number of orders in each of three categories, based on the total number of
-- items in each order. The three categories are: 'At Least 2000', 'Between 1000 and 2000' and 'Less than 1000'
SELECT CASE
WHEN o.total > 2000 THEN 'At Least 2000'
WHEN o.total BETWEEN 1000 AND 2000 THEN 'Be... | true |
212a46e2f2a30af30ba047c54985b4f287d70dc3 | SQL | febriasahrina/project_sispa | /admin/db_pegawai.sql | UTF-8 | 27,192 | 2.84375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 06 Apr 2015 pada 12.06
-- Versi Server: 5.6.20
-- PHP Version: 5.5.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... | true |
636d2bb633e763fa8129a54f75763ee6458dfdf3 | SQL | bschwartz757/SCC-GigCentral | /docs/markers-join-initial.sql | UTF-8 | 474 | 3.0625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT"
] | permissive | SET foreign_key_checks = 0; #turn off constraints temporarily
DROP TABLE IF EXISTS sc_markers;
DROP TABLE IF EXISTS sc_Markers;
CREATE TABLE sc_Markers(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
VenueKey INT UNSIGNED DEFAULT 0,
lat FLOAT( 10, 6 ) NOT NULL ,
lng FLOAT( 10, 6 ) NOT NULL ,
FOREIGN... | true |
7168e9973e05651c7391d7ce2f786a90403e8d64 | SQL | jongvin/werp | /werp/erpw/general/t_web/sql/Procedure/SP_T_FB_REPORT_TARGET3.sql | UHC | 2,653 | 2.96875 | 3 | [] | no_license | Create Or Replace Procedure SP_T_FB_REPORT_TARGET3_I
(
AR_CREATION_EMP_NO VARCHAR2,
AR_PAY_SEQ NUMBER
)
Is
/**************************************************************************/
/* 1. id : SP_T_FB_REPORT_TARGET3_I
/* 2. (ó) : Procedure
/* 3. : T... | true |
250b8984966127aeb5a73f5d293fc6864e1e31d6 | SQL | iSharipov/reviews-api | /src/main/resources/db/migration/V1__schema.sql | UTF-8 | 445 | 2.6875 | 3 | [] | no_license | create table review
(
id int auto_increment primary key,
title varchar(255) not null,
text varchar(500) null,
product_id int not null
);
create table product
(
id int auto_increment primary key,
name varchar(255) not null,
description varchar(100) not null
);
create table comment
(
id... | true |
4a57dbefdd4aeda3473bb2d990b4f4c665f1d083 | SQL | Priya-088/SQL | /SQLQuery1.sql | UTF-8 | 19,782 | 3.8125 | 4 | [] | no_license | --Mathematical functions
--ABS()
SELECT ABS(123.56);
SELECT ABS(-123.56);
--CELING()- Returns the immediate next value of the input number
SELECT CEILING(123.56);
SELECT CEILING(123.23);
SELECT CEILING(123);
--FLOOR()-Returns the immidiate last value for the input value
SELECT FLOOR(123.56);
SELECT FLOOR(123.... | true |
ef7d61ec776a1d0e01c3bd43c02b657b224217f3 | SQL | altope98/Angular8-Symfony4 | /api_rest_symfony.sql | UTF-8 | 4,080 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 12, 2019 at 09:15 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
ce9260d827da1fd6df2613c9292753aeaf920b5a | SQL | Yangyang176/community | /src/main/resources/db/migration/V10__Create_nav_table.sql | UTF-8 | 310 | 2.734375 | 3 | [] | no_license | CREATE TABLE nav
(
id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
title varchar(50) COMMENT '导航标题',
url varchar(256),
priority int DEFAULT 0 COMMENT '权重',
gmt_create bigint,
gmt_modified bigint,
status int COMMENT '状态'
);
ALTER TABLE nav COMMENT = '主页动态导航'; | true |
cfac283411817e6428d34592911ab142ab02036c | SQL | arnoldasl96/demoeshop | /demoeshop.sql | UTF-8 | 3,821 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 28, 2021 at 05:07 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
b58c16037da7a95f734d9bf1adc6d39a21bfa782 | SQL | bellmit/dbSmellsData | /data/open-source/extracted_sql/samskivert_samskivert.sql | UTF-8 | 892 | 3.609375 | 4 | [
"MIT"
] | permissive | select domain, siteId from domains
CREATE TABLE sites ( siteId INTEGER(5) PRIMARY KEY NOT NULL AUTO_INCREMENT, siteString VARCHAR(24) NOT NULL)
CREATE TABLE sessions ( sessionId INTEGER(10) PRIMARY KEY NOT NULL AUTO_INCREMENT, authcode VARCHAR(32) NOT NULL, userId INTEGER(10) NOT NULL, expires DATE NOT NULL, UNIQUE IND... | true |
f2626c2465ffc3ad8c3b9bd5bda539329aa7ca51 | SQL | Harish-here/i-stock | /i-stock sql files/product_details.sql | UTF-8 | 346 | 2.65625 | 3 | [] | no_license | CREATE TABLE `product_details` (
`product_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`color` varchar(45) NOT NULL,
`size` varchar(45) NOT NULL,
`stock` int(11) NOT NULL,
PRIMARY KEY (`product_id`),
UNIQUE KEY `product_id_UNIQUE` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=... | true |
0e63e72d2bb4fee2e15e6772ab1e4e146e90329d | SQL | anselmomgois/ControleEstoque | /Informatiz.ControleEstoque.AcessoDados/Resources/Relatorio/RelatorioEstoqueRecuperar.sql | UTF-8 | 873 | 3.71875 | 4 | [] | no_license | SELECT PS.DESPRODUTO,
PS.CODPRODUTO,
PS.DESCODBARRAS,
F.CODFILIAL,
F.DESFILIAL,
F.DESTELEFONEFIXO,
F.DESTELEFONEFAX,
F.DESTELEFONECEL,
F.DESEMAIL,
CASE WHEN SUM(DCP.NUMESTOQUE) IS NULL THEN 0 ELSE SUM(DCP.NUMESTOQUE) END AS ESTOQUE
FROM INFM_PRODUTOSERVICO AS PS
INNER JO... | true |
af682741c38b311f6ad9bfb0d35067f5c8f1bd9e | SQL | HerveyHall/collective-card-drawing-system | /Sources/RestServices/scripts/Mysql/DDL/user.sql | UTF-8 | 2,201 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
... | true |
574a6a8aa71ddb554653af572ce1be1b7ecc4f2a | SQL | jhlee7562/sql-basic-study | /1. 예제/5. GROUP BY, HAVING 학습.sql | UHC | 2,322 | 4.40625 | 4 | [] | no_license | -- # GROUP BY, HAVING
-- 1. Լ
SELECT
COUNT(emp_no) AS " ",
MAX(birth_de) AS " ",
MIN(birth_de) AS " "
FROM tb_emp;
SELECT * FROM tb_emp;
SELECT
COUNT(*),
COUNT(direct_manager_emp_no)
FROM tb_emp;
SELECT * FROM tb_sal_his;
-- 2. GROUP BY
-- μ , , μ ˰ ʹ.
SELECT * FROM tb_emp;
SELEC... | true |
facee989a0c346332ffcc6cc3a5697309c3dc4b1 | SQL | Qimingxingxing/cs6083-DataBase-Project | /Code/console.sql | UTF-8 | 12,152 | 3.171875 | 3 | [] | no_license | DROP table Tag;
DROP TABLE Rate;
DROP table Pledge;
DROP TABLE Updates;
DROP table Project;
# 1
CREATE TABLE `User` (
`uid` VARCHAR(45) NOT NULL,
`uname` VARCHAR(45) NOT NULL,
`password` VARCHAR(45) NOT NULL,
`uphone` VARCHAR(45) NULL,
`credit_card` VARCHAR(45) NULL,
`hometown` VARCHAR(45) NULL,
`intere... | true |
92aac14a5573ffa76528a397a458ef5a13c7bb7d | SQL | Beckkhan/job4j_hibernate | /db/scripts/update_003.sql | UTF-8 | 1,772 | 3.46875 | 3 | [
"Apache-2.0"
] | permissive | create table bodytype (
id serial primary key,
name varchar(200)
);
create table engine (
id serial primary key,
name varchar(200)
);
create table transmission (
id serial primary key,
name varchar(200)
);
create table users (
id serial primary key,
name varchar(50),
login varchar(50),
... | true |
30ae5da3734858e59530eee337d3058203977920 | SQL | manoel-ats/atsfinanceiro | /script/.svn/text-base/gera_valor.sql.svn-base | UTF-8 | 1,900 | 3.46875 | 3 | [] | no_license | CREATE OR alter TRIGGER gera_valor FOR NOTAFISCAL
ACTIVE AFTER INSERT POSITION 0
AS
declare variable parametro varchar(15);
declare variable parc SMALLINT;
declare variable total double PRECISION;
declare variable codMov INTEGER;
declare variable p INTEGER;
declare variable desconto DOUBLE PRECISION;
--... | true |
34d2dc50d32e4aa91715f3cc2bd82b0a02f5253a | SQL | vileopratama/luthansa.co.id | /database/backup/accounts.sql | UTF-8 | 1,948 | 2.953125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 11 Nov 2016 pada 10.08
-- Versi Server: 10.1.16-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
2a1b3b71deeb090bf97d8ace4483d3dd836441d4 | SQL | priya1398/E-commerce | /pythonlogin.sql | UTF-8 | 30,529 | 3.671875 | 4 | [] | no_license | drop database pythonlogin;
CREATE DATABASE IF NOT EXISTS `pythonlogin` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `pythonlogin`;
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(6) UNSIGNED NOT NULL DEFAULT '0',
`username` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
`email` ... | true |
f211603b2effcca5e9de34a56bd48574f67f7e99 | SQL | masumbillahwebdeveloperbd/eTemplate | /DB/db_etemplate (1).sql | UTF-8 | 32,929 | 3.46875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 04, 2020 at 01:59 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.3.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
37661ddee8dab49a55722a9a8e8fc58cf8e93db2 | SQL | jensradk/laddersystem | /mysql_exports/ttladder-2015-12-01_09-55.sql | UTF-8 | 6,956 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 01, 2015 at 09:54 AM
-- 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 |
0283504b76f915e0a0c309fd5f004e5e748af69f | SQL | blue19demon/study-wechat | /wx-walk/db/wxWalk.sql | UTF-8 | 621 | 2.828125 | 3 | [] | no_license |
CREATE DATABASE /*!32312 IF NOT EXISTS*/`wxWalk` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `wxWalk`;
/*Table structure for table `tb_content` */
DROP TABLE IF EXISTS `user_location`;
CREATE TABLE `user_location` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`open_id` varchar(255) NOT NULL,
`lng` varchar(200) N... | true |
feb5c0c0828802ffb2437019daf65e5d53be6f8a | SQL | msk-itstep-org/jv1911-katkov | /src/main/resources/db/migration/V3.0__dishes_ingredients.sql | UTF-8 | 4,851 | 3.25 | 3 | [] | no_license | create table dishes (
id int unsigned unique not null auto_increment primary key,
name varchar(100) not null unique,
cost int not null,
description varchar(255) null,
active bit default true,
menu_id int not null,
photo_id int null references uploads (id)
);
create table ingredients (
i... | true |
482cc05add677eb0466c3ac199d1108b5bed36c6 | SQL | Oluwaseyi000/inits-superfreighter | /superfreighters.sql | UTF-8 | 15,524 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Feb 26, 2021 at 05:57 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
06c4a51608f8e5fd11380da056154feadb7285e0 | SQL | harakonan/misc-codes | /SQL/SQL_Puzzle_2nd_Ed/p04/UPDATE2.sql | UTF-8 | 201 | 3.15625 | 3 | [] | no_license | UPDATE Badges
SET badge_seq = (SELECT COUNT(*)
FROM Badges B1
WHERE Badges.emp_id = B1.emp_id
AND Badges.badge_seq >= B1.badge_seq); | true |
3d9ff0b5312e436b51f27825e203a91ac292c270 | SQL | sogis/gretljobs | /afu_isboden_csv_import/fillinpks.sql | UTF-8 | 459 | 2.515625 | 3 | [
"MIT"
] | permissive | update
afu_isboden_csv_import_v1.csv_import_csv_import_t csv_import
set
bodeneinheiten_pk = bodeneinheit.pk_ogc_fid
from
afu_isboden.bodeneinheit_t bodeneinheit
where
csv_import.gemnr = bodeneinheit.gemnr
and
csv_import.objnr = bodeneinheit.objnr
;
update
afu_isboden_csv_import_v1.csv... | true |
e38c188f49b49e2831ce12c9954b04134d4baedc | SQL | aswanipranjal/text_extractor | /dunzo.sql | UTF-8 | 7,495 | 2.90625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 139.59.22.238
-- Server version: 5.7.27 - MySQL Community Server (GPL)
-- Server OS: Linux
-- HeidiSQL Version: 9.5.0.5196
-- ---------------------------------------------------... | true |
195f592d97c56692095ad9077640adeda65bed50 | SQL | nhussaini/BootcampX | /4_queries/name_of_teacher_that_assisted.sql | UTF-8 | 962 | 4.46875 | 4 | [] | no_license | -- Get the name of all teachers that performed an assistance request during a cohort.
-- Select the instructor's name and the cohort's name.
-- Don't repeat the instructor's name in the results list.
-- Order by the instructor's name.
-- This query needs to select data for a cohort with a specific name, use 'JUL0... | true |
7294e0c0306cba17931e028e777ad77022d54078 | SQL | yuanyuandinglove/test | /TestSwagger/src/main/resources/schema.sql | UTF-8 | 547 | 2.671875 | 3 | [] | no_license |
CREATE TABLE if NOT EXISTS `user` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(200) NOT NULL,
`address` VARCHAR(1000) NOT NULL,
`national_id` BIGINT(20) NOT NULL null,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB
AUTO_INCREMENT = 10
DEFAULT CHARSET = utf8;
CREATE TABLE IF NOT EXIST... | true |
0b48446cf923e64d75f4754deb6c01c84bec3c7c | SQL | dennymin/c0621-code-solutions | /sql-join/magic-mallrats.sql | UTF-8 | 280 | 2.9375 | 3 | [] | no_license | select "c"."firstName" as "Customer First Name",
"c"."lastName" as "Customer Last Name"
from "customers" as "c"
join "rentals" using ("customerId")
join "inventory" using ("inventoryId")
join "films" using ("filmId")
where "films"."filmId" = 547;
-- magic mallrats film id is 547
| true |
5a4d426a4d0025a25eff81391cd33b9e9c5321e7 | SQL | coolluucaas/cubos-desafio-final-back | /src/models/databaseModel.sql | UTF-8 | 1,157 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS cobrancas;
DROP TABLE IF EXISTS clientes;
DROP TABLE IF EXISTS usuarios;
CREATE TABLE usuarios (
id_usuario serial primary key ,
nome_usuario text not null,
email_usuario text not null unique,
senha text not null,
cpf_usuario varchar(14),
telefone_usuario varchar(15)
);
... | true |
8720f39802ebc5a8b0b87d715b6e7e966ca7f8e9 | SQL | gchacaltana/PLSQL-inscripcion-db | /db_inscripciones.sql | UTF-8 | 1,421 | 3.328125 | 3 | [] | no_license | CREATE TABLE inscripcion
(
id_curso VARCHAR2(20),
id_infante NUMBER,
fecha_reg DATE,
fecha_inicio DATE,
fecha_fin DATE,
estado VARCHAR2(10),
nota CHAR(1)
);
CREATE TABLE infante
(
id_infante NUMBER,
nombre VARCHAR2(20),
fecha_nac DATE
);
CREATE TABLE curso
(
id_curso VARC... | true |
f79192944f8c33774fe763a0c0e1ce2d685cbaab | SQL | muhammedessa/SQLSERVER_files | /Transact-SQL - sql server microsoft/Store Proc Input Parameters Example.sql | UTF-8 | 545 | 3.296875 | 3 | [] | no_license |
ALTER PROC GetInfo
@lastname varchar(50)='%'
AS
select p.LastName, p.FirstName , pp.PhoneNumber
from person.person p
join
person.PersonPhone pp
on
p.BusinessEntityID=pp.BusinessEntityID
where LastName LIKE @lastname
GetInfo 'Abbas'
ALTER PROC GetInfo
@lastname varchar(50),
@firstname varchar(50)
AS
sele... | true |
a980a91006ebf4ea8c66f2c5850875c23a360cc3 | SQL | Komport/mypython3examples | /migrate_nosql_rdbms_python/table_structure.sql | UTF-8 | 3,274 | 3.6875 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS login (
id VARCHAR(255) NOT NULL PRIMARY KEY,
userName LONGTEXT NOT NULL,
login VARCHAR(255) NOT NULL
);
CREATE TABLE IF NOT EXISTS contacts (
id VARCHAR(255) NOT NULL PRIMARY KEY,
name LONGTEXT NOT NULL,
fk_login VARCHAR(255),
FOREIGN KEY fk_login(fk_login)
R... | true |
32300bb3c505fbdb4e390b3dfb500af0a732d1bc | SQL | shorttimer2/test_task | /btest.sql | UTF-8 | 2,470 | 2.953125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Окт 10 2019 г., 13:30
-- Версия сервера: 10.4.5-MariaDB-1:10.4.5+maria~stretch
-- Версия PHP: 7.0.33-5+0~20190309015553.9+stretch~1.gbp4c6517
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = ... | true |
43fd8f0e92c24549fe2a56a990f69e0cd7e905b7 | SQL | bayapucg/psaaket-finall | /assets/db.sql | UTF-8 | 6,023 | 3.09375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
SQLyog Community v11.52 (64 bit)
MySQL - 10.1.31-MariaDB : Database - psaaket
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_... | true |
998c3447ea450c8d4b589b0798b2c687c3ccd741 | SQL | Zlatov/lab | /postgresql/if/if.sql | UTF-8 | 992 | 3.90625 | 4 | [] | no_license | -- Пример с CASE
SELECT 'CASE такая вот штука:' AS " ";
SELECT
a.a,
a.b,
CASE
WHEN a.a IS NULL THEN 0
WHEN a.b = 1 THEN 2
ELSE 3
END AS "a or b"
FROM (
SELECT
NULL::int AS "a",
1::int AS "b"
) AS a
;
-- Пример с COALESCE
-- Возвращает первый попавшийся аргумент, отличный от NULL. Если же ... | true |
74627877ea0955ba7f2672b42b390cd40462bedf | SQL | ArceAguirre/library_develop | /database/0.- procedure/user_codice.sql | UTF-8 | 6,951 | 3.15625 | 3 | [] | no_license | delimiter ;;
/****************************************************/
/* author | Arcelia Aguirre Treviño */
/* date | 18/01/2018 */
/* description | Agregar usuario */
/* name | user_codice_new */
/* parameters | in p_name va... | true |
1cf55e0862894c694be793e6887d93e2257a46dd | SQL | kazimuth/locale-list | /data/ur_IN/locales.mysql.sql | UTF-8 | 47,755 | 2.59375 | 3 | [
"MIT"
] | permissive | CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
INSERT INTO `list` (`id`, `value`) VALUES ('ur', 'اردو');
INSERT INTO `list` (`id`, `value`) VALUES ('ur_IN', 'اردو (بھارت)');
INSERT INTO `list` (`id`, `value`) V... | true |
3b91f622b531ff58f0ccc49ed5f93ffdbabfccb7 | SQL | kevintamez/Puntodeventa | /Stored Procedures.sql | UTF-8 | 1,974 | 3.53125 | 4 | [] | no_license |
delimiter &&
create procedure Manager(
Temail varchar(50),
Tnombre varchar(50),
Tcontraseña varchar(50),
TnombreSucursal varchar(25),
TidUsuario int,
opc varchar(10)
)
BEGIN
if opc="insert" then
insert into usuario(email,nombre,contraseña) values(Temail, Tnombre, Tcontraseña)
insert into sucursal(nombreSucurs... | true |
f2930a2ef3a9f6c62834dba1dce10b1b89a70cb7 | SQL | shotvibe/shotvibe-clientlib | /src/main/assets/create_shotvibe_upload_state.sql | UTF-8 | 861 | 3.875 | 4 | [] | no_license | CREATE TABLE uploading_photo(
-- Maintain the order of the uploading photos. This should not be set explicitly, SQLite will
-- automatically set a value during INSERT.
-- See: <http://www.sqlite.org/autoinc.html>
num INTEGER PRIMARY KEY,
-- The album that this photo is being uploaded to
album_id INTEGER REFERENCES alb... | true |
21a19800642920161b75babb0cf3a53caf3ff169 | SQL | alvarezleonardo/grupo_3_mannequin | /data/Backup/scripts/mannequin_db3.sql | UTF-8 | 11,343 | 3.453125 | 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_SUBSTI... | true |
a59e2baca96d6f9a56f16dcd4da574fa1790cc0a | SQL | nuannuanwu/qtxiaoxin | /protected/data/procedure/xiaoxin/php_xiaoxin_add_myapplication.sql | UTF-8 | 714 | 3.28125 | 3 | [] | no_license | DELIMITER $$
USE `xiaoxin`$$
DROP PROCEDURE IF EXISTS `php_xiaoxin_add_myapplication`$$
CREATE DEFINER=`dbManager`@`%` PROCEDURE `php_xiaoxin_add_myapplication`(aid INT,uid BIGINT,state INT)
BEGIN
DECLARE userid1 BIGINT DEFAULT 0;
DECLARE app1 INT DEFAULT 0;
DECLARE deleted1 INT DEFAULT 0;
SELECT userid INTO... | true |
3f8f32a716ffd2aa3d2eced3750f2c4c1cd5fbd7 | SQL | qkralswl689/DB | /SQL/hr/hr_test_02_26_1.sql | UHC | 2,027 | 4.46875 | 4 | [] | no_license | select * from employees;
-- Steven ̸
select * from employees
where first_name = 'Steven';
-- first_name last_name ̿ ־
select first_name || ' ' || last_name from employees
where first_name = 'Steven';
-- first_name last_name ̿ ־ Ī ̸
select first_name||' '||last_name as "̸" from employees
where first_name... | true |
09ef1eb3738d8fea05a282782271239f08077122 | SQL | geovaly/majortom | /majortom-db/src/main/resources/de/topicmapslab/majortom/database/jdbc/rdbms/script.sql | UTF-8 | 8,710 | 3.609375 | 4 | [] | no_license | DROP TABLE IF EXISTS locators;
CREATE TABLE locators (
id BIGINT NOT NULL AUTO_INCREMENT,
reference character varying(1024) NOT NULL,
CONSTRAINT pk_locators PRIMARY KEY (id)
);
DROP TABLE IF EXISTS topicmaps;
CREATE TABLE topicmaps(
id bigint NOT NULL AUTO_INCREMENT,
id_parent bigint,
id_topicmap bi... | true |
f9522996d4188a8840e3e1abd7c746b4ff0a40ee | SQL | tyguy310/database-server-client | /src/server/db/contact-db.sql | UTF-8 | 265 | 2.65625 | 3 | [] | no_license | DROP DATABASE IF EXISTS contact_db;
CREATE DATABASE contact_db;
\c contact_db
CREATE TABLE contacts (
ID SERIAL PRIMARY KEY,
first_name varchar,
last_name varchar,
date_of_birth timestamp with time zone,
eye_color varchar,
telephone_number varchar
);
| true |
292abdeb34f10498dbcfa2b0a4e21ed114b35ea1 | SQL | uk-gov-mirror/defra.prsd-weee | /src/EA.Weee.Database/scripts/Update/Release 1/SROC-hot-fix/201903143.rollback-2019-ea-charges.sql | UTF-8 | 698 | 3.15625 | 3 | [
"OGL-UK-3.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
SELECT
m.Id
INTO
#MemberUploadsId
FROM
[PCS].[MemberUpload] m
INNER JOIN [Organisation].Organisation o ON o.Id = m.OrganisationId
INNER JOIN [PCS].[Scheme] s ON s.OrganisationId = o.Id
INNER JOIN [Lookup].CompetentAuthority c ON c.Id = s.CompetentAuthorityId
WHERE
c.Abbreviation = 'EA'
AND m.ComplianceYear... | true |
38d38dc6f22b97a45855022a128d14fc59f499e9 | SQL | sw21-tug/Team_03 | /Backend/src/create_table_structure.sql | UTF-8 | 2,358 | 3.578125 | 4 | [
"MIT"
] | permissive | create table Ingredient
(
id int auto_increment
primary key,
name varchar(64) not null,
constraint Ingredient_name_uindex
unique (name)
);
create table User
(
id int auto_increment
primary key,
name varchar(32) not null,
password ... | true |
c9d80dfb769e3123027468b2524559d5b171df4f | SQL | niezhongbing/SSM | /数据库/t_net_bar.sql | UTF-8 | 2,755 | 2.984375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : NZB
Source Server Version : 50717
Source Host : localhost:3306
Source Database : test01
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2017-10-29 21:20:59
*/
SET FOREIGN_KEY_CHECKS=0;
-- --------... | true |
a76540c7f3b49abd103f943f4bff47974286755b | SQL | Thilen197/Hamrojobs | /OnlineJobs/onlinejobs.sql | UTF-8 | 16,435 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 01, 2021 at 05:23 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
d4c4f05855f650ec400cb15ea21fd01b5bf3f472 | SQL | safe-pro/DevSevOps | /6.DBA-ops/1.SQL练习/5.SQL学习/14-work-with-subquery.sql | UTF-8 | 673 | 3.734375 | 4 | [] | no_license | -- 使用子查询
-- 利用子查询进行过滤
SELECT order_num FROM orderitems WHERE prod_id='TNT2';
SELECT cust_id FROM orders WHERE order_num IN (20005,20007);
SELECT cust_id from orders WHERE order_num IN (SELECT order_num FROM orderitems WHERE prod_id='TNT2');
SELECT cust_name,cust_contact FROM customers WHERE cust_id IN (SELECT cust_id F... | true |
c209e9cd3348551c220d7ddd9d6e3e9b07fb0246 | SQL | herry88/cmssimpeg | /db_simpeg.sql | UTF-8 | 4,612 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Nov 20, 2020 at 08:08 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
eedf50de208f7290df5ff672d3cbe823362ed60d | SQL | ecolonb/docker-postgresql | /new-db-schema.sql | UTF-8 | 1,841 | 3.4375 | 3 | [] | no_license | CREATE TABLE "characters" (
"character_id" int4 NOT NULL PRIMARY KEY,
"name" varchar(89) NOT NULL,
"description" TEXT DEFAULT NULL,
"img_path" TEXT DEFAULT NULL,
"img_ext" TEXT DEFAULT NULL,
"created_at" timestamptz(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" timestamptz(6) NOT NULL DEFAULT CURREN... | true |
a84eba105e3776e6d6973de27f6759b30b5c3879 | SQL | treebat1/SQLSecurity | /ViewSchemaObjects.sql | UTF-8 | 915 | 4.15625 | 4 | [
"MIT"
] | permissive | --view objects in schemas
select p.name AS SchemaOwner, s.schema_id, s.name SchemaName, s.principal_id, o.object_id, o.name ObjectName
, o.type_desc ObjectDescription
from sys.schemas s
join sys.objects o on s.schema_id = o.schema_id
join sys.database_principals p on p.principal_id = s.principal_id
where s.n... | true |
454076f0ef5fa8e56d23744617a6c354563dd6a0 | SQL | ken-dji/My-first-projet- | /photo/projet_ken/sujet.sql | UTF-8 | 8,446 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mar. 03 sep. 2019 à 01:20
-- Version du serveur : 5.7.26
-- Version de PHP : 7.2.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
34e98d2d92a4ca0532dae710d2165faf4ed190f8 | SQL | MatthewCAlbert/myanimelist | /myanimelist.sql | UTF-8 | 3,340 | 3.296875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 07, 2018 at 07:58 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
cfae3867db072b74ffe8abe109317da9c6c151c1 | SQL | stepan-perlov/smartclient_treeview | /app/db/data/data_sources.sql | UTF-8 | 1,305 | 2.71875 | 3 | [] | no_license | INSERT INTO data_sources(
id,
constructor,
fields
) VALUES (
'locations_data',
'probe.servlets.api.LocationsDataDS',
'[
{"title": "Population", "name": "population", "type": "integer"},
{"title": "Area", "name": "area", "type": "integer"}
]'
), (
'locations',
'probe.servlets.api.LocationsDS',
... | true |
bf05a810b5b64ffc7dd2324990b4233037a7c540 | SQL | sshyran/gpdb | /src/test/tinc/tincrepo/mpp/gpdb/tests/storage/uao/uao_ddl/sql/alter_ao_tables_coltype.sql | UTF-8 | 2,834 | 3.484375 | 3 | [
"Apache-2.0",
"PostgreSQL",
"LicenseRef-scancode-rsa-md4",
"OLDAP-2.8",
"HPND-sell-variant",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"Zlib",
"LicenseRef-scancode-zeusbench",
"LicenseRef-scancode-mit-modification-obligations",
"OpenSSL",
"MIT",
"LicenseRef-scancode-other-copyleft",
"bzip2-1.0.6"... | permissive | -- @description : Alter UAO tables and execute DML statements on the tables
--
set time zone PST8PDT;
-- Create AO tables
DROP TABLE if exists sto_alt_uao1_datatype;
CREATE TABLE sto_alt_uao1_datatype(
text_col text default 'remove it',
bigint_col bigint,
char_vary_col character varyin... | true |
7abe1060395e18ee4ce89f81f75a5749442386dc | SQL | lucaspassa/primeros-pasos-web | /php-abm/sql/practicauno.sql | UTF-8 | 1,819 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 08-10-2019 a las 21:31:01
-- Versión del servidor: 5.7.27-0ubuntu0.18.04.1
-- Versión de PHP: 7.2.19-0ubuntu0.18.04.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*... | true |
a3e341c4f8d37292c45f33edefece3c3adc3b851 | SQL | delphdevweb/landingPage | /landing_page.sql | UTF-8 | 3,466 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5deb2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:3306
-- Généré le : ven. 19 fév. 2021 à 13:39
-- Version du serveur : 8.0.23-0ubuntu0.20.04.1
-- Version de PHP : 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:... | true |
c3ec399c6c7e71ec6241d0d16d8a8ec02d601720 | SQL | Hakkelo89/uhomie-vue.js-Laravel | /database/routines/sf_demand_property.sql | UTF-8 | 579 | 3.234375 | 3 | [] | no_license |
CREATE FUNCTION `sf_demand_property`(
property int
) RETURNS int
BEGIN
DECLARE post int DEFAULT 0;
DECLARE Slow int DEFAULT 0;
DECLARE done bool DEFAULT false;
DECLARE Shigh int DEFAULT 0;
DECLARE level int DEFAULT 0;
SET Shigh = 11;
SET Slow = 4;
SET post = (SELECT count(id)
FROM use... | true |
62fb569ebb4ca0401e99d5016db37c486d4a3e21 | SQL | yavuzselimblog/birvideotumuyelikislemleri | /tekvideoaltindasistem.sql | UTF-8 | 1,801 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 26 Haz 2021, 22:21:33
-- Sunucu sürümü: 10.4.13-MariaDB
-- PHP Sürümü: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... | true |
d7098fe3b29882b63c4c47fff30f6b90708a5aea | SQL | cyanesgarcia/SQL | /Yanes-Asssignment5/Query2-MP9.sql | UTF-8 | 288 | 3.984375 | 4 | [] | no_license | SELECT O.OrderID, C.ContactName, O.OrderDate, SUM(UnitPrice*Quantity) AS [Total]
FROM Orders AS O, Customers AS C, [Order Details] AS OD
WHERE OD.OrderID=O.OrderID
AND C.CustomerID=O.CustomerID
AND DATENAME(DW, OrderDate)= 'wednesday'
GROUP BY O.OrderID, C.ContactName, O.OrderDate | true |
c84f0653bec8101a3aa29c126d1e638ae7039fda | SQL | gonzalinismo/empresaFantastica | /AyD2.sql | UTF-8 | 7,764 | 3.046875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Fri Oct 12 16:59:50 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
5c67c78db6b488a47388f0723184067a4c452b69 | SQL | villim/One-Library | /docs/sql/03-create-tables.sql | UTF-8 | 1,127 | 3.71875 | 4 | [] | no_license | DROP TABLE IF EXISTS BOOK;
DROP TABLE IF EXISTS BOOKINFO;
DROP TABLE IF EXISTS SERIESBOOK;
DROP TABLE IF EXISTS USER;
DROP TABLE IF EXISTS BORROWHISTORY;
CREATE TABLE BOOK (
ID VARCHAR(16) NOT NULL PRIMARY KEY,
CREATE_DATETIME TIMESTAMP,
STATUS VARCHAR(8),
BORROWER_ID VARCHAR(16),
BORROW_DATETIME TIMESTAMP,
... | true |
9a695d6af487696a2c547780c4e00fde7dd0af13 | SQL | Sarvesh64/Java-Web-Projects | /028SpringHibMVC_Person_CustomerAPP/person.sql | UTF-8 | 461 | 3.015625 | 3 | [] | no_license | create table MYPERSON (person_id int primary key auto_increment,
name varchar(30),country varchar(30));
insert into MYPERSON (name,country)values('Smita','India');
insert into MYPERSON (name,country) values('Jim','USA');
/*create table MYPERSON (person_id number primary key,
name varchar2(30),country varchar2(30));
... | true |
6dd5e19e6a15fc51642051b26693193b29985feb | SQL | adamclayman/mocksis | /Mock_School_Information_Application/DBMS DDL and DML/DDL.sql | UTF-8 | 2,816 | 3.96875 | 4 | [
"Apache-2.0"
] | permissive |
DROP TABLE IF EXISTS School;
CREATE TABLE School (
School_ID INT NOT NULL AUTO_INCREMENT,
School_Name VARCHAR(50) NOT NULL,
Street_Address VARCHAR(100) DEFAULT NULL,
City VARCHAR(50) DEFAULT NULL,
Zip_Code VARCHAR(10) DEFAULT NULL,
PRIMARY KEY (School_ID),
UNIQUE KEY School_Name (School_Name)
) ENGINE=I... | true |
032e7af053097784f9dfd0ae51988e8f7ac78c85 | SQL | Martin-BG/Pragmatic---Java-Advanced | /Projects/imdb/src/main/resources/sql/schema.sql | UTF-8 | 2,612 | 3.84375 | 4 | [] | no_license | DROP DATABASE IF EXISTS `imdb`;
CREATE DATABASE `imdb`;
USE `imdb`;
CREATE TABLE `movies` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`title` VARCHAR(50) NOT NULL UNIQUE,
`year` INT(4) UNSIGNED NOT NULL
);
CREATE TABLE `trailers` (
`movie_id` INT NOT NULL,
`url` VARCHAR(255) NOT NULL UNIQ... | true |
c86ace7e92c4ad2ab364ce221a91f5d6bcd163e3 | SQL | rldutch1/sql_repo | /MySQL/miscellaneous/vetting_database.sql | UTF-8 | 771 | 2.765625 | 3 | [] | no_license | SubjectsLESAdmin links to the CaseNumber column in all of the tables below.
SubjectsLESArchive Links to SubjectsLESAdmin
SubLESEmail
SubLESPhone
SubLESJensiya
SubLESNatlID
SubLESPassport
SubLESFoodVoucher
SubLESMilID
SubLESResCard
SubjectsLESVetting
SIV-IOM
select
casenumber
, casetype
, reqagency
, acquiresec... | true |
0e7881eaea3d11419d30adc3e0a5fbd6d4a0d130 | SQL | Stoned17/curso_backend | /20191012_SEM09_RETO/database/empresa.sql | UTF-8 | 7,482 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 15-10-2019 a las 10:19:05
-- Versión del servidor: 10.4.6-MariaDB
-- Versión de PHP: 7.3.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
7f8a967e47b46b9630317dcca9fb4775994a2cb6 | SQL | wzg0131/deploy_one | /db_spring/update_lining_gps_tag_spring.sql | UTF-8 | 7,358 | 3.625 | 4 | [] | no_license | use `spring`;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for wp_custom_tag
-- ----------------------------
DROP TABLE IF EXISTS `wp_custom_tag`;
CREATE TABLE `wp_custom_tag` (
`tag_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自定义标签表主键',
`tag_name` varchar(255... | true |
0fb9ac792d762575e9fae0f38808c2886ba5d001 | SQL | green-fox-academy/huli-kalendaryo-backend | /src/main/resources/db/migration/V11__google_auth_id_change.sql | UTF-8 | 359 | 3.03125 | 3 | [] | no_license | ALTER TABLE google_calendar
DROP FOREIGN KEY google_calendar_ibfk_2,
DROP COLUMN google_auth_email;
ALTER TABLE google_auth
DROP PRIMARY KEY;
ALTER TABLE google_auth
ADD id BIGINT AUTO_INCREMENT PRIMARY KEY;
ALTER TABLE google_calendar
ADD google_auth_id BIGINT;
ALTER TABLE google_calendar
ADD FOREIGN KEY (goog... | true |
b9c0c7d8c3dc60a9e90739aae805909e09f1c712 | SQL | hafbau/lecture_notes | /assessment-exam-proctor/exams/exam-web-05sh/question-code/00.sql | UTF-8 | 814 | 3.078125 | 3 | [] | no_license | -- =========== --
-- QUESTION 00 --
-- =========== --
--
-- Fetch all stores, ordered by the year they opened (oldest first)
-- Include all the columns from the table
-- ============ --
-- TEST COMMAND --
-- ============ --
--
-- sqlite3 -column -header supporting-files/test.sqlite3 < answers/00.sql
-- ==============... | true |
4e875c7739b19b3fb130eef7411510849eed66a4 | SQL | StiX1919/personalProject | /db/editPost.sql | UTF-8 | 180 | 2.640625 | 3 | [] | no_license | SELECT p.id, p.post_title, p.post_sub, p.post, p.runnerid, u.username, u.city, u.state, u.runner, u.profilepic, p.userid
FROM posts p, users u WHERE u.id = p.userid and p.id = $1; | true |
1ea40a4533b3d97816727309051053de660dfe6d | SQL | LaurieFrank/project1 | /db/cocktail_shop.sql | UTF-8 | 357 | 3.1875 | 3 | [] | no_license | DROP TABLE cocktail_items;
DROP TABLE producers;
CREATE TABLE producers (
id SERIAL8 PRIMARY KEY,
producer_name VARCHAR(255)
);
CREATE TABLE cocktail_items (
id SERIAL8 PRIMARY KEY,
product_name VARCHAR(255),
description TEXT,
quantity INT8,
buy_cost INT8,
sell_price INT8,
producer_id INT8 REFERENCE... | true |
eca8325e6f9be240e55e397f017845b4cd2da8ab | SQL | ciphersbak/psftpp | /SQLs/Check_COMBOEdits.sql | UTF-8 | 1,589 | 2.640625 | 3 | [] | no_license | --COMBO Edit Checks
--Budgets CC Combo Edit Template
SELECT 'BUDGETS_CC_COMBO', A.* FROM PS_TSE_BD_KK_FLD A WHERE BUSINESS_UNIT = 'UNUNI' ORDER BY TSE_PROC_INSTANCE DESC;
--Combo Template for Journals
SELECT 'JOURNALS_COMBO', A.* FROM PS_TSE_JLNE_FLD A WHERE BUSINESS_UNIT = 'UNUNI' ORDER BY TSE_PROC_INSTANCE DESC;
--Vo... | true |
3f0c129c2bc603ea382d95c2e20d34526a38ac8c | SQL | RahulDas-dev/Postgres-Setup | /dbcreation.sql | UTF-8 | 2,448 | 3.765625 | 4 | [] | no_license | /* Start of uers and Role Creation Creation */
/* Log in to Default Db[postgres] with Default user [postgres]*/
CREATE ROLE app_admin WITH
LOGIN
NOSUPERUSER
INHERIT
NOCREATEDB
NOCREATEROLE
NOREPLICATION
CONNECTION LIMIT 10
PASSWORD 'app_admin';
COMMENT ON ROLE app_admin IS 'app_admin will be having t... | true |
e50e8c0793c81afa05662f52942815440812c0de | SQL | thangduong3010/PL-SQL | /Practice/PLSQL Fund/Oracle11g-PLSQL-I-Solution/08-Subprograms.SQL | UTF-8 | 2,110 | 3.59375 | 4 | [] | no_license | /*
Copyright (c) 2010 Sideris Courseware Corporation. All Rights Reserved.
Each instructor or student with access to this file must have purchased
a license to the corresponding Sideris Courseware textbook to which
these files apply. All other use, broadcast, webcast, duplication or distribution
is prohibited and ill... | true |
a94de03b4fae16c4ae44f4affa8af76f49bf81b2 | SQL | E69-Heracles/dangerzone | /development/new_tables.sql | UTF-8 | 8,734 | 2.703125 | 3 | [
"BSD-2-Clause"
] | permissive | DROP TABLE IF EXISTS badc_air_event;
CREATE TABLE badc_air_event (
campanya VARCHAR(30),
mapa VARCHAR(30),
misnum VARCHAR(30),
misrep VARCHAR(30),
hlkiller VARCHAR(30) BINARY ,
plane_killer VARCHAR(60),
hlkilled VARCHAR(30) ... | true |
e326b585283a3f0cd7833055f795c13ac4cba278 | SQL | morontt/progl | /resources/sql/queries.sql | UTF-8 | 325 | 3.5625 | 4 | [] | no_license | -- :name get-visible-posts :? :*
-- :doc get visible posts
SELECT `p`.`title`, `p`.`text_post`, `p`.`url`, `p`.`time_created`, `c`.`name` AS `cat_name`, `c`.`url` AS `cat_url`
FROM `posts` AS `p`
INNER JOIN `category` AS `c` ON c.id = p.category_id
WHERE (p.hide = 0) ORDER BY `p`.`time_created` DESC LIMIT 10 OFFSET :of... | true |
744b4f11dbc73b41700fb512bb88070247f4edaf | SQL | WiPeK/sqlGenerator | /resources/out/star/create.sql | UTF-8 | 1,601 | 3.21875 | 3 | [] | no_license | DROP TABLE g1_Zaliczenie CASCADE CONSTRAINTS ;
DROP TABLE g1_przedmiot CASCADE CONSTRAINTS ;
DROP TABLE g1_student CASCADE CONSTRAINTS ;
DROP TABLE g1_wykladowca CASCADE CONSTRAINTS ;
CREATE TABLE g1_przedmiot
(
id_przed NUMBER (5) NOT NULL ,
nazwa VARCHAR2 (25) ,
typ VARCHAR2 (15)
) ;
ALTER... | true |
ecbd9cc209ac2daecd866f969c4e54ce681b64d8 | SQL | ibranafis/RESTAPI | /TASK1_CreateDatabaseSchema/db.sql | UTF-8 | 1,478 | 3.9375 | 4 | [] | no_license | CREATE TABLE TEACHERS(
ID INTEGER NOT NULL,
FIRST_NAME VARCHAR(15),
LAST_NAME VARCHAR(25),
SUBJECT VARCHAR(15),
PRIMARY KEY(ID)
);
CREATE TABLE CLASSES(
CLASS_ID INTEGER NOT NULL,
C_NAME VARCHAR(4),
PRIMARY KEY(CLASS_ID)
);
CREATE TABLE STUDENTS(
ID INTEGER NOT NULL,
FIRST_NAME VARC... | true |
c1a7beead3dd427d50b2f3416600ef29022d1d8e | SQL | stevecole804/sql | /create_trigger_user_role_on_update_all.sql | UTF-8 | 160 | 2.5625 | 3 | [] | no_license | DELIMITER $$
CREATE TRIGGER `tr_update_lms_user_role_on_update` AFTER UPDATE ON `users_roles`
FOR EACH ROW
BEGIN
CALL sp_lms_user_role_UPDATE(NEW.uid);
END $$ | true |
f79a65d26d2be6c7c0209a0fb411f3fe4102d3f9 | SQL | darrell-ulm/SQL-Queries | /duplicate records by index i.sql | UTF-8 | 653 | 3.796875 | 4 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | -- based on query by David Jones and shared over Sierra listserv 9/20/16
-- Finds records that share i indexed fields
SELECT
id2reckey(p.record_id)||'a' AS rid,
p.index_entry
FROM
sierra_view.phrase_entry as p
JOIN
sierra_view.bib_record as b
ON
p.record_id=b.record_id
WHERE
--presently limited to... | true |
e12860944e08ba1beae19f0c0f9153878e35c1be | SQL | amanfrinati/bovana | /anagrafe_schema.sql | UTF-8 | 8,476 | 3.328125 | 3 | [] | no_license | -- Elimino tutte le tabelle se esistono
DROP TABLE IF EXISTS Proprietario CASCADE;
DROP TABLE IF EXISTS Deterrente CASCADE;
DROP TABLE IF EXISTS ASL CASCADE;
DROP TABLE IF EXISTS Trasportatore CASCADE;
DROP TABLE IF EXISTS Motivo CASCADE;
DROP TABLE IF EXISTS Razza CASCADE;
DROP TABLE IF EXISTS Ditta CASCADE;
DROP TABL... | true |
31417def4647605cf2864fd112adeb06ba3ce510 | SQL | rlafferty/oracle-scripts | /poder_pub/tools/unprepare_user.sql | UTF-8 | 1,476 | 2.53125 | 3 | [] | no_license | --------------------------------------------------------------------------------
--
-- Author: Tanel Poder
-- Copyright: (c) http://www.tanelpoder.com
--
-- Notes: This software is provided AS IS and doesn't guarantee anything
-- Proofread before you execute it!
--
-------------------------------------------... | true |
74fbbf195c3857a30cc168c32725aa6a7ebd516b | SQL | raulrene/sfaw-test | /site-dan/migrations/newSite_courses.sql | UTF-8 | 3,111 | 3.109375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `newSite` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `newSite`;
-- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: newSite
-- ------------------------------------------------------
-- Server version 5.5.43-0ubuntu0.14.04.1
/*!40101 SE... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.