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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3f20d8bb8c859f0ab2eed22639e6c8c6f36a5044 | SQL | stedisan/App | /JobService/jobservice.sql | UTF-8 | 6,301 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Creato il: Lug 21, 2017 alle 11:55
-- Versione del server: 10.1.22-MariaDB
-- Versione PHP: 7.1.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
d493935504f6d39e302031cfb7acffc220c24b7f | SQL | prakharrathi25/Sports-Management-System | /data/users (1).sql | UTF-8 | 1,696 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 08, 2020 at 08:48 PM
-- Server version: 5.6.47-log
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
2ec4773352ac48fd0917107c125d4a0d017807fc | SQL | dev-dmadan/stripo-plugin-creatio | /app/database/db.sql | UTF-8 | 2,851 | 3.515625 | 4 | [
"MIT"
] | permissive | # Local Development Only
-- Remove commentary if you want build database from zero
# DROP DATABASE IF EXISTS `dev-stripo`;
# CREATE DATABASE `dev-stripo`;
# USE `dev-stripo`;
# End Local Development Only
-- Table Email
DROP TABLE IF EXISTS email;
CREATE TABLE IF NOT EXISTS email (
id VARCHAR(255) NOT NULL UNIQUE... | true |
7dc27daa4dc84c5743a1f3404235089722d5a3f3 | SQL | pr-intellisolutions/motorcycle-insurance | /db/prmi.sql | UTF-8 | 19,769 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 04, 2015 at 06:46 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
004517f1962b3d5de54199394019dcb1d83d11f6 | SQL | hupling/datenbankII | /blatt3/MainArbeiter.sql | UTF-8 | 1,550 | 3.265625 | 3 | [] | no_license | SET SERVEROUTPUT ON FORMAT WRAPPED;
DECLARE
arbeiter_ arbeiter_t;
bcode NUMBER;
gcode NUMBER;
ID NUMBER;
arbeiternr varchar2(100);
jahre number;
BEGIN
FOR arbeiter_ IN (
SELECT
name, vorname, geburtsmonat,(stundenlohn * 40 * 4 * 12) AS jahresgehalt... | true |
ba97cb0a5f871e1556432fae6cc5551f5a29aa85 | SQL | 52YvesMahama/MyDataBAses | /angular.sql | UTF-8 | 1,755 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 10, 2018 at 08:42 PM
-- Server version: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
1751c1a68a0d24f315b95cec2378039148c200a7 | SQL | roysouravv30/INFO7370 | /AdventureWorks & AdventureWorksDW/DDL Scripts/Inventory_MYSQL.sql | UTF-8 | 5,569 | 3.421875 | 3 | [] | no_license | --
-- ER/Studio Data Architect SQL Code Generation
-- Project : Adventure Work DW DM1.DM1
--
-- Date Created : Wednesday, September 30, 2020 16:02:46
-- Target DBMS : MySQL 5.x
--
--
-- TABLE: DimDate
--
CREATE TABLE DimDate(
DateKey INT NOT NULL,
FullDateAlternateKe... | true |
62ad7eed1cafe259d1e34f82d0d7bb6a895d5c50 | SQL | APPTeam2/Website | /assets/sql/script-creation-base_Version2 (version phpMyAdmin).sql | UTF-8 | 5,245 | 3.34375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Jeu 09 Juin 2016 à 14:35
-- Version du serveur : 5.7.9
-- Version de PHP : 5.6.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_C... | true |
5a0755780377eac7ee3c03e5875e8a7a0a4b75d4 | SQL | RodMal52/proyecto-seguridad | /foro.sql | UTF-8 | 436 | 2.59375 | 3 | [] | no_license | -- Crear tablas
create table usuarios (
usuario varchar(10) primary key not null,
passwd varchar(10)
);
create table entradas (
usuario varchar(10),
texto varchar(500)
);
-- Crear algunos usuarios
insert into usuarios values ('jperez', '123456');
insert into usuarios values ('clopez', 'password')... | true |
e6b92a00bd1415137c9a8a038fcc8ab46648dfa3 | SQL | maclochlainn/adv-plsql-code | /chapter-08/compare_me.sql | UTF-8 | 1,866 | 3.453125 | 3 | [] | no_license | /* ****************************************************************************
--------------------------------------------------------------------------------
FILENAME: ch_08_utl_sec.sql
AUTHOR(S): John M Harper, Michael McLaughlin, Brandon Hawkes, Tyler Hawkes
COPYRIGHT: (c) 2014 McLaughlin Software Development... | true |
6bc10a9bacea41ba1e95e3cb22b3a5c008c7306d | SQL | jrlawyer/Querying-with-Transact-SQL | /Examples/5-17_set operators_union, intersect, except.sql | UTF-8 | 473 | 3.234375 | 3 | [] | no_license | --Mod 4:
--UNION Demo
SELECT FirstName, LastName, 'Employee' AS Type
FROM SalesLT.Employees
UNION ALL
SELECT FirstName, LastName, 'Customer'
FROM SalesLT.Customer
ORDER BY LastName;
--INTERSECT Demo
SELECT FirstName, LastName
FROM SalesLT.Employees
INTERSECT
SELECT FirstName, LastName
FROM SalesLT.Customer
ORDER B... | true |
80891123ac4c2a3621a87318de5f8c575331423c | SQL | vishnuys/miniattendancetracker | /Attendance/attendance.sql | UTF-8 | 3,845 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 08, 2015 at 09:05 AM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
6de30da55addadb76d96ce0f6993438bbb37a1d9 | SQL | john-emry/CSE135_Project | /sql/PrecomputedSalesView.sql | UTF-8 | 1,518 | 4.4375 | 4 | [] | no_license | with overall_table as
(select pc."ProductID",c."State",sum(CAST(pc."Price" as bigint)*pc."Quantity") as amount
from order_history_products pc
inner join order_history sc on (sc."OrderHistoryID" = pc."OrderHistoryID")
inner join products p on (pc."ProductID" = p."ProductID") -- add category filter if any
in... | true |
8249b68a24f8aad9caba5f73c15d564815e032a7 | SQL | Hiroaki-Inomata/ORCA-5-1 | /jma-receipt.r_5_1_branch/sql/4.6/orcadbup_receden_4.6.0-1.sql | UTF-8 | 563 | 2.875 | 3 | [] | no_license | -- tbl_receden --
\set ON_ERROR_STOP
ALTER TABLE tbl_receden DROP CONSTRAINT tbl_receden_primary_key;
alter table tbl_receden add column kohid_key bigint default 0;
alter table tbl_receden add column crehms char(6);
update tbl_receden set kohid_key = 0;
update tbl_receden set crehms = '';
alter table tbl_receden alte... | true |
d9ea37222b111fb5f4bbff5e746af28924d6c311 | SQL | baruchoz/hw-week4-day2-sql-mock_theater | /amazon_mock_create.sql | UTF-8 | 1,276 | 4.03125 | 4 | [] | no_license | -- Primary Keys can't be empty of duplicated
CREATE TABLE customer(
customer_id SERIAL PRIMARY KEY,
first_name VARCHAR(100),
last_name VARCHAR(100),
address VARCHAR(150),
billing_info VARCHAR(150)
);
-- Brand Table Creation
CREATE TABLE brand(
seller_id SERIAL PRIMARY KEY,
brand_name VARCHAR(150),
contact_num... | true |
05eea22ca16330b5f6b8c38fd462b78da2f5519c | SQL | VasilSlavchev/reservation-salles | /reservationsalles.sql | UTF-8 | 3,366 | 3.15625 | 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 : ven. 13 déc. 2019 à 20:36
-- 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 |
63d46487077c0b49094c2b84188c194c4d1c863d | SQL | Fernando540/Badass-House | /2-Procedures.sql | UTF-8 | 18,222 | 3.03125 | 3 | [] | no_license | use prograbatiz_BadAssHouse;
drop procedure if exists valida;
drop procedure if exists altaTipo;
drop procedure if exists validaSerie;
drop procedure if exists registraCasa;
drop procedure if exists altadespensuki;
drop procedure if exists UsoProducto;
drop procedure if exists actualiza;
drop procedure if exists BajaPr... | true |
3c82adf991c167b82eef36ae718f02b8b4a473df | SQL | zuzu-ai/Prototipo1P | /Script.sql | UTF-8 | 2,862 | 3.453125 | 3 | [] | no_license | drop database pp;
create database pp;
use pp;
create table cliente(
nit_cliente varchar(128) primary key,
nombre varchar(128) not null,
direccion varchar(128) not null,
telefono varchar(128) not null,
correo varchar(128) not null
)engine=Innodb;
create table usuario(
id_usuario varchar(128) primary key,
nombre_usuari... | true |
a12739bbf53f88f874d3ca7d3b3be0251fb1da0a | SQL | lutece-platform/lutece-auth-module-mylutece-notification | /src/sql/plugins/mylutece/modules/notification/plugin/create_db_mylutece_notification.sql | UTF-8 | 1,230 | 2.84375 | 3 | [] | no_license | --
-- Structure for table mylutece_notification
--
DROP TABLE IF EXISTS mylutece_notification;
CREATE TABLE mylutece_notification (
id_notification INT(11) DEFAULT 0 NOT NULL,
id_folder INT(11) DEFAULT 0 NOT NULL,
is_read SMALLINT DEFAULT 0 NOT NULL,
sender VARCHAR(255) DEFAULT '' NOT NULL,
user_guid_rece... | true |
eeacdba48c929ef795eee5dcdd2e1f601fed3e4a | SQL | closetothe/detdb | /scraper/detonations/data_seed_1.sql | UTF-8 | 4,572 | 3.078125 | 3 | [] | no_license | INSERT INTO categories(name)
VALUES
('cell size'); -- 1
INSERT INTO details(property_id, value)
VALUES
(5, '"N2"'), -- 1
(3, '"H2"'), -- 2
(4, '"N2O"'), -- 3
(1, '100.0'), -- 4
(2, '293.0'), -- 5
(6, '1.0'); -- 6
INSERT INTO detonations(name, category_id, file_name, added_by, citation_id, legacy, pressure_id, tempe... | true |
7f340815d8a87a16d236b5073217b6b8f4b8d57c | SQL | 15amitbhagat/farm | /farm.sql | UTF-8 | 4,671 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 04, 2021 at 10:20 AM
-- 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 |
dc519119b9617da97a47fd013db68386dcfeb66f | SQL | Felipeb1003/sql-crowdfunding-lab-onl01-seng-ft-050420 | /lib/insert.sql | UTF-8 | 1,905 | 2.75 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO users (id, name, age) VALUES (1, 'Amanda', 7), (2, 'Beto', 9), (3, 'Ilda', 16), (4, 'Alexia', 34),
(5, 'Harry', 21), (6, 'Madam', 50), (7, 'Roxy', 18), (8, 'Vixen', 46), (9, 'Detox', 100), (10, 'Mike', 18),
(11, 'Gigi', 67), (12, 'Ru', 98), (13, 'Sammy', 10), (14, 'Soraya', 35), (15, 'Diana', 22), (16, 'Jan... | true |
76e32c78a98ca2cb15fe98dc5e3a8074d5b6e2b8 | SQL | LuyeT/Fantasy_Taverns-mysql | /tables/roles.sql | UTF-8 | 266 | 2.671875 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `Roles` (
RoleID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
roleName VARCHAR(32),
roleDescription VARCHAR(512)
);
INSERT INTO Roles (roleName) VALUES
('Admin'),
('Bartender'),
('Chef'),
('Maid'),
('Receptionist'),
('Horse massager');
| true |
470eb045d031bb799c830056aa883988d187e881 | SQL | jdaniel14/GRPIAA-LOAD-OSM | /otros/BD_interna/db_modificacion.sql | UTF-8 | 3,407 | 3.84375 | 4 | [] | no_license | --QUERY PARA VER QUE GEOM DE LA RED VIAL ESTAN DENTRO DE UN DISTRITO
DO $$DECLARE r record;
BEGIN
FOR r IN SELECT iddistrito, nombre, geom FROM distrito LOOP
BEGIN
UPDATE redvial SET idzona = r.iddistrito
WHERE ST_Intersects(r.geom, geom);
EXCEPTION
WHEN OTHERS THEN
RAISE WARNING 'Lo... | true |
3e49c7ed5b6a67177525c14367b24d9e3104d581 | SQL | jaffarjawed/demo-dbt | /target/run/demo_dbt/models/staging/my_second_dbt_model.sql | UTF-8 | 199 | 2.515625 | 3 | [] | no_license |
create or replace view ECOM_DATA.staging.my_second_dbt_model as (
-- Use the `ref` function to select from other models
select *
from ECOM_DATA.staging.my_first_dbt_model
where id = 1
);
| true |
a39a07159f2422f830cdc0bb49efa11e40092c4d | SQL | DanielJKelly/crfc | /server/src/sql/tables/tables.sql | UTF-8 | 3,011 | 3.59375 | 4 | [] | no_license | drop table if exists Lists;
create table Lists (
id int not null auto_increment primary key,
userid int not null,
name varchar(48) not null,
isOrdered boolean not null,
_created datetime default current_timestamp,
_updated datetime default current_timestamp on update current_timestamp
);
drop table if ... | true |
ce63e14b84c7b63acc4cd076fe775dacad494207 | SQL | sainathjonnala/Employee_Management_System | /SQL_Dump/employee_management_departments.sql | UTF-8 | 2,150 | 2.875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: employee_management
-- ------------------------------------------------------
-- Server version 8.0.16
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... | true |
9eb1b19eeeb30200b0fe2d0578ea3933bf2b416d | SQL | deyvy10/PlataformaBusqueda | /publikate.sql | UTF-8 | 10,649 | 2.984375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 25-09-2018 a las 17:46:53
-- Versión del servidor: 10.1.32-MariaDB
-- Versión de PHP: 7.0.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00... | true |
fdfecabdbb193f67a68d4f6e0e257e77a7f24768 | SQL | jimmyalf/temp | /Spinit.Wpc.Synologen.Database/dbo/Stored Procedures/spCommerceSearchMailAddress.sql | UTF-8 | 1,164 | 3.28125 | 3 | [] | no_license | CREATE PROCEDURE spCommerceSearchMailAddress
@type INT,
@id INT,
@mlId INT,
@status INT OUTPUT
AS
BEGIN
IF @type = 0
BEGIN
SELECT cId,
cMlId,
cEmail,
cIsActive,
cCreatedBy,
cCreatedDate,
cChangedBy,
cChangedDate
FROM tblCommerceMailAddres... | true |
e9b4b8a87a59f55b36c42180d1b42f63d3ce0c55 | SQL | rgwood/dockerized-postgres | /database/data.sql | UTF-8 | 2,737 | 2.546875 | 3 | [
"MIT"
] | permissive | --
-- PostgreSQL database dump
--
-- Dumped from database version 11.2 (Debian 11.2-1.pgdg90+1)
-- Dumped by pg_dump version 11.2 (Debian 11.2-1.pgdg90+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
S... | true |
3912bebe5a5f0cc0f90f538a1746d6728839cac4 | SQL | hysmun/WebJavaAirport | /creaBD.sql | UTF-8 | 8,255 | 2.953125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: bd_airport
-- ------------------------------------------------------
-- Server version 5.7.19-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_R... | true |
ae45f01e4e08751f868403a02d95978f9d301adb | SQL | yanweiling/windsound | /sql/groupMenu.sql | UTF-8 | 1,528 | 2.515625 | 3 | [] | no_license | -- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url,menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('词组', '3', '1', '/module/group', 'C', '0', 'module:group:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '词组菜单');
-- 按钮父菜单ID
SELECT @parentId := LA... | true |
4189b90a8fe7c732da5c8a984e47b5c7df711252 | SQL | Adrinachong1997/Software-Engineering- | /oldBG/beergame.sql | UTF-8 | 7,095 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2019 年 01 月 03 日 13:07
-- 伺服器版本: 10.1.36-MariaDB
-- PHP 版本: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
dbb46790ac8ee5c28076f2f3e61d3ff38b64ddcb | SQL | NCIP/tcga-sandbox-v1 | /trunk/qclive-test-data-generator/src/main/resources/sql/DeleteQcliveTestData.sql | UTF-8 | 4,191 | 2.515625 | 3 | [] | no_license | declare myuser varchar2(50);
begin
select user into myuser from dual;
if NOT (myuser like '%TEST%') then
goto theEnd;
end if;
DELETE FROM CLINICAL_CONTROL_ARCHIVE;
DELETE FROM CLINICAL_CONTROL_ELEMENT;
DELETE FROM CLINICAL_CONTROL;
DELETE FROM FOLLOW_UP_ARCHIVE;
DELETE FROM FOLLOW_UP_ELEMENT;
DELETE FR... | true |
1b64f8a17b5520889278d171f1d2c0b5a42a6c1f | SQL | INL/COBALT | /LexiconTool/sql/addIndexes.sql | UTF-8 | 1,497 | 2.6875 | 3 | [] | no_license | ALTER TABLE analyzed_wordforms ADD INDEX multipleLemmataAnalysisId (multiple_lemmata_analysis_id);
ALTER TABLE analyzed_wordforms ADD INDEX awfId (analyzed_wordform_id ASC);
ALTER TABLE corpusId_x_documentId ADD INDEX documentIdIndex (document_id);
ALTER TABLE corpusId_x_documentId ADD INDEX corpusIdIndex (corpus_id);
... | true |
31df55d0792a03ef88fc9cd5a3e505cdd1e327eb | SQL | rexxmagtar/Ds3 | /Polyclinik/PolyclinicService/CreateScript.sql | UTF-8 | 1,069 | 2.71875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Wed Oct 21 16:53:31 2020
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- --------------------------------------... | true |
311486668661d41765525167d766a9561fa8ba80 | SQL | derekhuangxd/CISC-332-Database-Management-Systems | /Deliverable 2/Database Scripts/RelationalSchema.sql | UTF-8 | 2,634 | 3.578125 | 4 | [] | no_license | CREATE DATABASE animal;
USE animal;
CREATE TABLE SPCABranches(
NAME VARCHAR(50) NOT NULL,
phoneNumber CHAR(10),
street VARCHAR(100),
city VARCHAR(100),
province VARCHAR(100),
postalCode CHAR(6),
PRIMARY KEY(NAME)
);
CREATE TABLE RescueOrganization(
NAME VARCHAR(50) NOT NULL,
phoneN... | true |
d3602785a7778acb5e8bdbb6d20ed5a108b0b601 | SQL | laufendentdecken/trainingstool | /src/main/resources/sql/create-db.sql | UTF-8 | 517 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | drop table training if exists;
create table training (
id integer primary key GENERATED BY DEFAULT AS IDENTITY(START WITH 1),
user_id integer,
schedule_date date,
description varchar(4000),
training_type varchar(200)
);
drop table user if exists;
create table user (
id integer primary key GENERATED BY DEF... | true |
9a87c5c648b24f8bd6fb4064c48a68e672e980b9 | SQL | tamboer/scrum | /docs/scrum_2012-11-14.sql | UTF-8 | 14,356 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 14, 2012 at 01:27 PM
-- Server version: 5.5.28
-- PHP Version: 5.3.10-1ubuntu3.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
3641ce5be09f4938d0bc30693f698134a59f9b7b | SQL | KarmaScripter/BudgetExecution | /Data/Database/Access/DataModels/INSERT/InsertBackUpAllocationUpdates.sql | UTF-8 | 381 | 2.515625 | 3 | [
"MIT"
] | permissive | INSERT INTO ApplicationTables
SELECT name AS TableName, REFERENCE AS Model
FROM [Reference.accdb].MSysObjects
WHERE name NOT LIKE _#% AND
name NOT LIKE #% AND
name NOT LIKE f_#% AND
name NOT LIKE f_% AND
name NOT LIKE tbl_% AND
name NOT LIKE USys% AND
name NOT LIKE MSys% AND
name NOT LIKE R... | true |
8ec74e861d50a18a5c3a9ccbdf0b812fae1e7fc0 | SQL | matrixorigin/matrixone | /test/distributed/cases/distinct/distinct.sql | UTF-8 | 5,179 | 3.78125 | 4 | [
"Apache-2.0"
] | permissive |
-- test keyword distinct
drop table if exists t1;
create table t1(
a int,
b varchar(10)
);
insert into t1 values (111, 'a'),(110, 'a'),(100, 'a'),(000, 'b'),(001, 'b'),(011,'b');
select distinct b from t1;
select distinct b, a from t1;
select count(distinct a) from t1;
select sum(distinct a) from t1;
select avg(di... | true |
233350096642b25f390f2fcaa696628b6e84146e | SQL | kinjal2110/Food-Ordering-System | /food-order.sql | UTF-8 | 6,869 | 2.9375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 17, 2021 at 02:42 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.3.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
a0fae65bf79800165b3801927866ecfe8c8182e9 | SQL | gyk/sql-query-fu | /windowfunctions/ranking.sql | UTF-8 | 613 | 3.953125 | 4 | [] | no_license | # Q.0
select row_number() over (order by color, name) as unique_number, name, color
from cats
order by unique_number
# Q.1
#
# Pitfall: Do not put `order by name` inside the `over` clause.
select rank() over (order by weight desc) as ranking, weight, name
from cats
order by ranking, name
# Q.2
select dense_rank() ove... | true |
71b75a67b2278da98a7455f4625100f65676e84b | SQL | BucknellSustainability/Flower | /backend/sql/events.sql | UTF-8 | 1,006 | 3.953125 | 4 | [
"MIT"
] | permissive | # Show existing events
SHOW EVENTS;
# Look at any specific event
SHOW CREATE EVENT DataAggregationEvent;
# Delete any specific event
DROP EVENT DataAggregationEvent;
# Create an event that aggregates data
CREATE DEFINER=`energyhill`@`%` EVENT `DataAggregationEvent` ON SCHEDULE EVERY 10 MINUTE STARTS '2017-12-03 14:1... | true |
63276a219e10b4e43eec891916403de8dc5afbe5 | SQL | sergioncio/SQL | /c46.sql | UTF-8 | 221 | 3.671875 | 4 | [] | no_license | select isbn, titulo, nombre
from libro, editorial
where nombre IN
(select nombre
from editorial
where editorial_id=id)
AND
not (isbn IN
(select libro_id
from existencias
GROUP BY existencias))
;
| true |
a3aa115b50feb68b7ee7cae8f197e417d68bda42 | SQL | Tsingtuan/tsingtuan-database | /setup.sql | UTF-8 | 793 | 3.53125 | 4 | [] | no_license | CREATE TABLE university (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255),
university_code CHAR(5)
);
CREATE TABLE organization (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(255),
university_code CHAR(5) REFERENCES university(university_code),
organization_id VARCHAR(255),
image VARCHAR(255)
)... | true |
47800bfa7ba1a704e2c29090c56e0635c2811bdd | SQL | cardenizen/mnroad | /sql/views.sql | UTF-8 | 19,766 | 4.46875 | 4 | [] | no_license | SELECT VIEW_NAME,TEXT
FROM all_views
WHERE owner = 'MNR'
and VIEW_NAME in ('CELL_ON_CELL','CELL_DATES','CELLS')
ORDER BY VIEW_NAME;
--
CREATE OR REPLACE VIEW CELL_ON_CELL AS
SELECT
CC.CELL_ID ID_UNDER
,(SELECT CELL_NUMBER FROM CELL WHERE ID = CC.CELL_ID) CELL_UNDER
,(SELECT CLASS FROM CELL WHERE ID = CC.CELL_ID) CLASS... | true |
65382be19f8ee6a563001756a2fa81ffa8d20849 | SQL | esmith80/bootcampx | /1_queries/4_no_gmail_or_phone.sql | UTF-8 | 211 | 3.390625 | 3 | [] | no_license | --Get all of the students without a gmail.com or phone number.
--Get their name, email, id, and cohort_id.
SELECT name, id, cohort_id, email
FROM students
WHERE email NOT LIKE '%gmail.com'
AND phone IS null;
| true |
02ed99d6fb040a48638afb749f3d419a6df317f0 | SQL | zx19980210/- | /戒毒中心 网页开发/database/ee5.sql | UTF-8 | 23,575 | 3.328125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 24, 2020 at 09:51 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0237b8d9bc0620c785a98a469cb99c689bb40906 | SQL | julialj95/langrec-api | /migrations/003.do.create_saved_resources_table.sql | UTF-8 | 197 | 2.984375 | 3 | [] | no_license | CREATE TABLE saved_resources (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
user_id INTEGER REFERENCES users(id) NOT NULL,
resource_id INTEGER REFERENCES resources(id) NOT NULL
); | true |
fe79b8b378e09ba8c7a004e52d6cb259eaf6470f | SQL | andrewlaery/Project77Code-GitHub | /_2 Query - RECORDS_PROJECTS detail view.sql | UTF-8 | 1,029 | 3.859375 | 4 | [] | no_license |
-- RECORDS_PROJECTS view with detail.
SELECT
-- RECORDS_PROJECTS.membersID AS MembersID ,
CONCAT(RECORDS_MEMBERS.NameFirst , ' ' , RECORDS_MEMBERS.NameLast) AS NameFull ,
-- RECORDS_MEMBERS.ClubsID AS ClubsID ,
-- RECORDS_PROJECTS.QualificationsID AS QualificationsID,
TMI_QUALIFICATIONS.qualification AS Qualifica... | true |
b999b5ac5ab447a1ebe9a3790ca4e39958b8c969 | SQL | jinxTelesis/BCS260Database | /project-AndreLussier-part4.sql | UTF-8 | 4,329 | 2.96875 | 3 | [] | no_license |
-- id last first advisor enrolled dormname roomnum phone date degree
INSERT INTO STUDENT VALUES(40000011,'Reznor','Trent','Dr Thomas','Matericulated','bacon hall','108','603-487-9812','1999-08-21','Computer Science',
'Trent.Reznor@yahoo.com');
INSERT... | true |
de23afcfdeed2a7da701303e5b0efc57f75f3622 | SQL | Wim4rk/BTH-databas | /skolan/insert.sql | UTF-8 | 1,927 | 3.59375 | 4 | [] | no_license | -- RESET data to TABLES
USE skolan;
SET NAMES 'utf8';
-- Add teacher staff
--
DELETE FROM larare;
-- INSERT INTO larare VALUES ('sna', 'DIPT', 'Severus', 'Snape', 'M', 40000, '1951-05-01', 1);
-- INSERT INTO larare VALUES ('dum', 'ADM', 'Albus', 'Dumbledore', 'M', 80000, '1941-04-01', 1);
-- INSERT INTO larare VALUE... | true |
5e9052ab5e66398ad5c65ccba7dc072efc65e232 | SQL | 176660/SQL_aegread | /Iga aegrea kohta üks tabel/create_btree_index.sql | UTF-8 | 91 | 2.78125 | 3 | [] | no_license | CREATE INDEX stock_amzn_date_idx
ON stock_amzn USING btree
(date DESC NULLS LAST);
| true |
28e552ea769699aab2caecb80f1f04f8dad7b9d1 | SQL | jack-sherman/capstone-mockup | /sql-scripts/create_tables.sql | UTF-8 | 2,496 | 4.03125 | 4 | [] | no_license | -- Create Customers table
----Note that this will have to have a prefilled row for anonymous
create table customers (
id serial,
custName varchar(255) not null,
email varchar(100),
phone varchar(15),
custAddress varchar(255),
newsletter boolean default false,
donorBadge varchar(100),
sea... | true |
fa2d0b997b81305e1f71e5df8102118ffcc88f94 | SQL | IMZIEE/PPID-Banjar | /database/db_rweb20.sql | UTF-8 | 3,644 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 24, 2020 at 04:04 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
6218bbae02cbc3fa985d2d50bcc03c4b5bb054d1 | SQL | Bonseong/KOPO_TIL | /DB/PLSQL/Day01 210701/3_NESTED_BLOCK_EXCEPT_2.SQL | UHC | 969 | 2.625 | 3 | [
"MIT"
] | permissive | BEGIN
INSERT INTO DEPT VALUES(66, 'OUTER_BLK_PARK', 'MAIN_BLK');
<<NESTED_BLOCK_1>>
BEGIN
INSERT INTO DEPT VALUES(76, 'LOCAL_PART_1', 'NESTED_BLK1');
INSERT INTO DEPT VALUES(777, 'LOCAL_PART_1', 'NESTED_BLK1'); -- Ÿӿ
-- INSERT INTO DEPT VALUES(77, 'LOCAL_PART_1', 'NESTED_BLK1'... | true |
a58cbc4780dd7de1e1cfcf09c7ffe5a7ac17bb1c | SQL | gaku3601/scala-play-transaction | /conf/evolutions/default/1.sql | UTF-8 | 274 | 2.734375 | 3 | [] | no_license | --- !Ups
create table users
(
id bigserial PRIMARY KEY,
name varchar(255),
age integer,
updated_at timestamp not null default current_timestamp,
created_at timestamp not null default current_timestamp
);
--- !Downs
drop table users; | true |
ea0a4f0bf3df9c38f18c61e7b0dcceecf4dd05b5 | SQL | ProgrammnieInzheneri/VSTU | /use_training_db.sql | UTF-8 | 4,979 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Сен 15 2019 г., 22:32
-- Версия сервера: 10.1.40-MariaDB
-- Версия PHP: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
06d1913da8ee50a550700f2db354a8d4dc209330 | SQL | awsid9/CatalogueExport | /inst/sql/sql_server/analyses/901.sql | UTF-8 | 548 | 3.71875 | 4 | [
"Apache-2.0"
] | permissive | -- 901 Number of drug occurrence records, by drug_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
select 901 as analysis_id,
CAST(de1.drug_CONCEPT_ID AS VARCHAR(255)) as stratum_1,
cast(null as varchar(255)) as stratum_2,
cast(null as varchar(255)) as stratum_3,
cast(null as varchar(255)) as stratum_4,
cast(nul... | true |
be76d74f82be7e428a023084c9774e0b13797910 | SQL | tienthanh7992/thcstto | /src/main/resources/data/ches.sql | UTF-8 | 8,066 | 2.9375 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.5
-- Dumped by pg_dump version 10.5
-- Started on 2018-10-29 00:45:04 +07
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_ca... | true |
adf9fc8def9fa2c4ae5d6f90872f0d28060b1053 | SQL | BackupTheBerlios/liman-svn | /trunk/db/liman_struktur.sql | UTF-8 | 2,775 | 3.546875 | 4 | [] | no_license | --
-- Tabellenstruktur für Tabelle `liman_Autoren`
--
DROP TABLE IF EXISTS `liman_Autoren`;
CREATE TABLE IF NOT EXISTS `liman_Autoren` (
`Autor_Nr` int(11) NOT NULL auto_increment,
`Autorname` varchar(40) NOT NULL,
PRIMARY KEY (`Autor_Nr`),
UNIQUE KEY `Autorname` (`Autorname`),
FULLTEXT KEY `Autorname_2` ... | true |
745c965ecb6924bec716109bd82962d6e35b8843 | SQL | axreldable/data-engineer-test-task-python-sql | /sql/happiest_user_tweets.sql | UTF-8 | 791 | 3.5 | 4 | [] | no_license | select u.name, t.text
from tweets t
inner join users u on t.user_id = u.id
where u.name = (select name
from (select u.name, sum(t.sentiment) as total_sentiment
from tweets t
inner join users u on t.user_id = u.id
group b... | true |
667c4cec8efcf8f382bcd9f205451268d964f01a | SQL | qwezertino/frozen-test | /mysql/6task.sql | UTF-8 | 323 | 3.546875 | 4 | [] | no_license | SELECT user.email, user.wallet_balance, user.wallet_total_refilled, user.like_total_balance, pack.id as PACK, SUM(pack.price) as SUM_PACK_PRICE, SUM(upl.likes) as SUM_LIKES
FROM `user_pack_log` as upl LEFT JOIN user on upl.user_id = user.id
LEFT JOIN boosterpack as pack on upl.pack_id = pack.id
GROUP BY user.id, pack.i... | true |
837636ee134b725ed3a69883454366a3b5c1b175 | SQL | galadREAL/school_projects | /MySQL-Challenge-master/SQL_ALL_Clean.sql | UTF-8 | 17,738 | 4.375 | 4 | [] | no_license | -- 1a. Display the first and last names of all actors from the table actor.
SELECT
first_name AS 'Actor First Name',
last_name AS 'Actor Last Name'
FROM
sakila.actor;
-- 1b. Display the first and last name of each actor in a single column in upper case letters. Name the column Actor Name.
... | true |
13ee85968d1500ed83f7d91b5249be9aea94b9d3 | SQL | Dogemist/butTest | /user-manager/user-manager-rest-api/src/modules/projects/sql/update.sql | UTF-8 | 212 | 2.53125 | 3 | [
"MIT"
] | permissive | /**
* Updates the project with the given name and returns the updated record
*/
UPDATE ${schema~}.project
SET project_url = (project_url || ${projectURL}::jsonb)
WHERE project_name = ${projectName}
RETURNING *
| true |
358c820823529c9a5c1e6cdf485e5b7641a617ec | SQL | gurunaua/simple_jwt_api | /src/main/resources/run.sql | UTF-8 | 886 | 3.15625 | 3 | [] | no_license | CREATE DATABASE 'aan';
CREATE TABLE `users` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`email` varchar(50) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`password` varchar(100) DEFAULT NULL,
`username` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UKr43af9ap4edm43mmtq01oddj6` (`username`),
... | true |
78048ace5cae4be13d78035eae80729d9a1e4a21 | SQL | PeteThePirate/data-science-on-gcp | /03_sqlstudio/contingency2.sql | UTF-8 | 432 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | DECLARE THRESH INT64;
SET THRESH = 15;
SELECT
COUNTIF(dep_delay < THRESH AND arr_delay < 15) AS true_positives,
COUNTIF(dep_delay < THRESH AND arr_delay >= 15) AS false_positives,
COUNTIF(dep_delay >= THRESH AND arr_delay < 15) AS false_negatives,
COUNTIF(dep_delay >= THRESH AND arr_delay >= 15) AS t... | true |
e764483dca7e3b245054fa8b17e573b94021082f | SQL | zinmyoswe/AGD-Bank-Report | /FIN_LEDGER_STATEMENT_DOMESTIC.sql | UTF-8 | 13,910 | 3.15625 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE FIN_LEDGER_STATEMENT_DOMESTIC AS
PROCEDURE FIN_LEDGER_STATEMENT_DOMESTIC( inp_str IN VARCHAR2,
out_retCode OUT NUMBER,
out_rec OUT VARCHAR2 );
END FIN_LEDGER_STATEMENT_DOMESTIC;
/
CREATE OR REPLACE PACKAGE BODY ... | true |
bb2411601b4b2905e594292c035c613331c2b1f8 | SQL | lenyueocy/lenyueCms | /application/weixin/weixin_scores.sql | UTF-8 | 573 | 2.984375 | 3 | [] | no_license |
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `lenyue_weixin_scores`;
CREATE TABLE `lenyue_weixin_scores` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(50) NOT NULL DEFAULT 0 COMMENT '用户id',
`openid` varchar(100) NOT NULL DEFAULT '' COMMENT 'openid',
`scores` int(100) NOT NULL COMMENT '历史最高... | true |
418bf50d42c4a2e8bbcf13d213b1e285de06c5c9 | SQL | hxmn/WIM | /WIM/Loaders/IHS/Post Load Checks/Sub_300IPL.sql | UTF-8 | 853 | 2.921875 | 3 | [] | no_license | -- SCRIPT: Sub_300IPL.sql
--
-- PURPOSE:
-- This is a sub-script of Load_check_*.sql scripts. It performs 300IPL specific checks
-- It is NOT INTENDED TO BE RUN DIRECTLY as it assumes a number of
-- variables and settings have already been defined by the master script.
--
-- HISTORY:
-- 8-Sep-09 R. Ma... | true |
ca0166f4a73496a1dd6e17bb9568df35ec25bdf6 | SQL | thangduong3010/PL-SQL | /Script/rdbms_admin/odmpatch.sql | UTF-8 | 2,779 | 2.8125 | 3 | [] | no_license | Rem
Rem $Header: rdbms/admin/odmpatch.sql /st_rdbms_11.2.0/1 2011/05/03 09:34:10 xbarr Exp $ odmpatch.sql
Rem
Rem ##########################################################################
Rem
Rem Copyright (c) 2001, 2011, Oracle and/or its affiliates.
Rem All rights reserved.
Rem
Rem NAME
Rem odmpatch.sql
R... | true |
a18d1253ac3312bc61c8c1be3ba8d900f863faff | SQL | WesleySiNeves/Scripts_SQL_Server | /2.Conteudo de otimizacao/2.Indices/9.BuscaIndicesIdenticos.sql | UTF-8 | 3,651 | 4.1875 | 4 | [] | no_license | ;WITH CTE_INDEX_DATA
AS (SELECT SCHEMA_DATA.name AS schema_name,
TABLE_DATA.name AS table_name,
INDEX_DATA.name AS index_name,
STUFF(
(
SELECT ', ' + COLUMN_DATA_KEY_COLS.name + ' '
+ CASE
WHEN INDEX_COLUMN_DATA... | true |
b270fffb2584af3bd7d53a54972b252c418befeb | SQL | dinghao1230110/learn | /sql/learn.sql | UTF-8 | 5,516 | 3.34375 | 3 | [] | no_license | -- --------------------------------------------------------
-- 主机: localhost
-- 服务器版本: 10.1.16-MariaDB - mariadb.org binary distribution
-- 服务器操作系统: Win64
-- HeidiSQL 版本: 9.3.0.4984
-- ------------------------------------------------... | true |
2181e6845727c22f9e267c09d7d5562fc7c0cbb5 | SQL | FUUK/fuuk | /fuuk/people/models/sql/updates/update-0.11-department.mysql.sql | UTF-8 | 652 | 3.4375 | 3 | [] | no_license | ALTER TABLE people_department ADD COLUMN name varchar(200);
ALTER TABLE people_department ADD COLUMN name_en varchar(200);
ALTER TABLE people_department ADD COLUMN name_cs varchar(200);
UPDATE people_department AS t1
INNER JOIN people_departmenttranslation AS t2
ON t2.id = t2.master_id
SET t1.name_en =... | true |
c31210f10993dee8f1d76137735cba8b65356c75 | SQL | gizmostudios/gray-unicorn | /database_dumps/separated_tables/django_web_auth_user_groups.sql | UTF-8 | 2,728 | 2.765625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.13, for macos10.14 (x86_64)
--
-- Host: localhost Database: django_web
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS... | true |
5818944bb4107f971b3e2011ca15511e5d0cca0c | SQL | MathieuChailloux/JO2024-equipements | /requests/createTopo.sql | UTF-8 | 3,061 | 4.0625 | 4 | [] | no_license | create extension pgrouting
\set reseau_table_name 'reseau_route'
\set reseau_vertices_table_name 'reseau_route_vertices_pgr'
create table reseau_route_pc (
id integer,
geom geometry(MultiLineString,4326),
source integer,
target integer,
cost float,
reverse_cost float,
constraint reseau_route_pc_pkey primary ke... | true |
b39cec61d7587e3a4823042b604033808f18f828 | SQL | StaciAF/holbertonschool-higher_level_programming | /0x0D-SQL_introduction/15-groups.sql | UTF-8 | 239 | 3.078125 | 3 | [] | no_license | -- script lits the number of records with same score in second_table of database hbtn_0c_0
-- using MySQL server, database name to be passed
SELECT `score`, COUNT(*) AS `number` FROM `second_table` GROUP BY `score` ORDER BY `number` DESC;
| true |
baa23ccc2aba93c763d62a6c160bea37597d91b3 | SQL | soarescbm/e-cidade | /e-cidade/db/v2.3.26/down/pre_v2.3.26.sql | ISO-8859-1 | 9,014 | 2.828125 | 3 | [] | no_license | /**
* Arquivo pre que desfaz as alteracoes do pre (up)
*/
/**
* TIME B
*/
delete from db_itensfilho where id_item = 9952;
delete from db_menu where id_item = 9952;
delete from db_itensmenu where id_item = 9952;
delete from db_sysarqmod where codarq = 3718;
delete from db_sysarqcamp where codarq... | true |
93b01738b2484c732a6c0f26ac76b57a10426ca6 | SQL | durvallucas/octoevents-kotlin | /src/main/resources/db/migration/V01__create_issue_event.sql | UTF-8 | 672 | 3.84375 | 4 | [] | no_license |
CREATE SEQUENCE octo.sq_issue START WITH 1 INCREMENT by 1 NO CYCLE;
CREATE TABLE octo.issue(
id NUMERIC(8) NOT NULL,
number NUMERIC(8) NOT NULL,
created_at TIMESTAMP NOT NULL,
CONSTRAINT pk_issu PRIMARY KEY (id)
);
CREATE SEQUENCE octo.sq_issue_event START WITH 1... | true |
27f88c2273ecff841ad301efce01b2fc44b391e1 | SQL | vingelklang/fd-server | /resources/sql/queries.sql | UTF-8 | 781 | 4 | 4 | [] | no_license | -- :name insert-day! :! :n
-- :doc adds the predictions for this day
INSERT INTO predictions
(day, m01, m02, m03, m04)
VALUES (:day, :m01, :m02, :m03, :m04)
on conflict (day) do update
set m01 = :m01, m02 = :m02, m03 = :m03, m04 = :m04;
-- :name update-day! :! :n
-- :doc updates predictions for this day
UPDATE pre... | true |
00e0f3ae62aa8663237831518e6ad4437d91482e | SQL | festralm/11-904_DataBase_2_course | /marketplace/sql/V10__good_storage_create.sql | UTF-8 | 231 | 2.515625 | 3 | [] | no_license | CREATE TABLE `good_storage` (
`id` int NOT NULL,
`good_id` int DEFAULT NULL,
`storage_id` int DEFAULT NULL,
`count` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
| true |
25516424ab5c59b1526cb470aa588f991735977d | SQL | termlex/Vocabulary-v5.0 | /MeSH/load_stage.sql | UTF-8 | 7,216 | 3.765625 | 4 | [
"Unlicense"
] | permissive | /**************************************************************************
* Copyright 2016 Observational Health Data Sciences and Informatics (OHDSI)
*
* 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 Li... | true |
9e0c77cd3157c25cb7059ba0a28bf5e869de6c0f | SQL | v-stamenova/Database-Exercises | /Subqueries-and-Joins/11. Min Average Salary.sql | UTF-8 | 203 | 3.953125 | 4 | [] | no_license | SELECT TOP(1) AVG(Employees.Salary) AS MinAverageSalary FROM Employees
INNER JOIN Departments ON Departments.DepartmentID = Employees.DepartmentID
GROUP BY Departments.Name
ORDER BY MinAverageSalary ASC; | true |
ebc7dc385fc913e4f85a7bed6ca5c4d72834e516 | SQL | ethArek/paste-code | /specs/db/003_seed-languages.sql | UTF-8 | 240 | 2.640625 | 3 | [] | no_license | -- Migrate up
INSERT INTO languages
(id, name, short_name, created_at)
VALUES
(1, 'JavaScript', 'JS', now()),
(2, 'Go', 'Go', now()),
(3, 'Pascal', 'Pas', now());
-- Migrate down
DELETE FROM languages WHERE id IN (1, 2, 3); | true |
0d9d825a84f35168faaad94925c67b1fc4168c4e | SQL | Litox-x/DB | /lab3/task5.sql | WINDOWS-1251 | 256 | 2.546875 | 3 | [] | no_license | Use Ostapuk_UNIVER
SELECT _, FROM STUDENT;
SELECT COUNT(*) From STUDENT;
SELECT * FROM STUDENT WHERE = ''
SELECT DISTINCT TOP(2) * FROM STUDENT ORDER BY _ Desc; | true |
136c7a1727d09c62b23551519b8acf2f7df38c05 | SQL | ezsimple/sql | /mariaDB/VW_STATS.sql | UTF-8 | 1,896 | 3.5625 | 4 | [] | no_license | CREATE VIEW vw_stats_leaders_point AS
select cast(a.pp_rank as signed) AS pp_rank,
a.pp_index AS pp_index,
a.pp_tcode AS pp_tcode,
b.mm_name_display AS mm_name_display,
concat(b.mm_mname,' ',b.mm_lname,' ',b.mm_fname) AS e_mm_name_display,
a.pp_year AS pp_year,
b.mm_code AS mm_code,
cast(round(a.pp_point,0) as signed)... | true |
dcf55602889a3b0a6b3a2cb0da6ac43647d3e692 | SQL | PanasyukDan/op-test-api | /src/main/resources/db/V001__create_database.sql | UTF-8 | 623 | 3.578125 | 4 | [] | no_license | CREATE TABLE beer (
id bigint NOT NULL,
name character varying(255),
description character varying,
image_url character varying(255),
abv float,
ibu float,
volume int,
volume_unit character varying(255),
UNIQUE(name),
CONSTRAINT beer_pkey PRIMARY KEY (id)
);
CREATE TABLE user (
... | true |
9d14887912de1ea30b92c533e342286b37cafa3c | SQL | JackFay/clubtennisapi | /src/database.sql | UTF-8 | 739 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS events CASCADE;
create table events (
id integer auto_increment,
`date` datetime not null,
title varchar(250) not null,
`desc` varchar(250) null,
PRIMARY KEY (id)
);
CREATE TABLE users (
user_id INTEGER AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(... | true |
1f5bb1c5d6ec5464b9d922ed4361444b2fd2a531 | SQL | ope-dev-group/oep-project | /qloudbiz-api-product/src/main/resources/db/migration/V1_0_4__init_productline_table.sql | UTF-8 | 1,197 | 3.0625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mariadb
Source Server Version : 50505
Source Host : 192.168.11.130:3306
Source Database : productdb
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-12-04 16:05:02
*/
-- ---------------------... | true |
b123ee8de153ac1d14e694ce1d03308cc3bc1de6 | SQL | epiii/sister | /shared/db/@tables/level.sql | UTF-8 | 608 | 2.90625 | 3 | [] | no_license | # Host: localhost (Version: 5.6.20)
# Date: 2015-01-28 15:33:28
# Generator: MySQL-Front 5.3 (Build 4.187)
/*!40101 SET NAMES latin1 */;
#
# Structure for table "level"
#
DROP TABLE IF EXISTS `level`;
CREATE TABLE `level` (
`id_level` int(11) NOT NULL AUTO_INCREMENT,
`level` varchar(20) NOT NULL,
`action` va... | true |
8370d79a401b7fbdb8cc4c5b7406454bf01a9d48 | SQL | TonryR/acme_medical | /ACME_Medical.sql | UTF-8 | 2,290 | 3.65625 | 4 | [] | no_license | DROP DATABASE IF EXISTS ACME_Medical;
CREATE DATABASE ACME_Medical;
USE ACME_Medical;
-- creates database
CREATE TABLE IF NOT EXISTS `Patients` (
`patientID` int(11) NOT NULL AUTO_INCREMENT,
`fName` varchar(50) NOT NULL,
`lName` varchar(250) NOT NULL,
`gender` varchar(7) NOT NULL,
`birthdate` varchar(250) NO... | true |
5f7bd763297e7e8114707fa596eb0047549bae58 | SQL | muten84/spring-security-oauth2 | /others/sdoordinari-aaa/target/generated-resources/sql/ddl/auto/oracle10g.sql | UTF-8 | 30,374 | 3.109375 | 3 | [] | no_license | create sequence hibernate_sequence start with 1 increment by 1;
create table CP_APPLICATION (
id varchar2(255 char) not null,
createdBy varchar2(255 char),
createdDate timestamp,
lastModifiedBy varchar2(255 char),
lastModifiedDate timestamp,
DESCRIPTION varchar2(255 ... | true |
659856bbd70d0041bd2e1bec4ade9b706938fa45 | SQL | jademy-12/WebMediaStoreRox | /src/main/resources/db/mysql/V2016.10.06_0054__mysql_create_shoppingcarts_table.sql | UTF-8 | 144 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE shopping_carts (
id int(11) NOT NULL AUTO_INCREMENT,
user_id int(11) NOT NULL,
shopping_cart_date DATE,
PRIMARY KEY (id)
); | true |
54cd77fa7ce08647086237da423e920959db257a | SQL | Roberto12586/Practicas-SQL | /ejercicio1.sql | UTF-8 | 4,574 | 3.5625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS concesionario;
USE concesionario;
CREATE TABLE coches(
id int(10) AUTO_INCREMENT NOT NULL,
modelo varchar (255),
marca varchar (50),
precio int (20)not null,
stock int(255)not null,
CONSTRAINT pk_coches PRIMARY KEY(id)
)ENGINE = INNODB;
CREATE TABLE grupos(
id... | true |
01a5d7b2622201dff4caf457424a9b33bd3eadf6 | SQL | Nivek-/USM-SQL | /SQL Server/Script final v2.sql | UTF-8 | 3,909 | 3.46875 | 3 | [] | no_license |
CREATE TABLE Alumno (
cod_alumno NVARCHAR(11) NOT NULL,
nombre NVARCHAR(20) NOT NULL,
apellido NVARCHAR(20) NOT NULL,
pass VARCHAR(10) NOT NULL,
CONSTRAINT Alumno_pk PRIMARY KEY (cod_alumno)
)
CREATE TABLE Asignatura (
cod... | true |
2d2b55c6e631ca9aa2d90442972eba7027f853eb | SQL | yamfood/yamfood | /resources/migrations/basket/20191128083344-baskets.up.sql | UTF-8 | 123 | 2.90625 | 3 | [] | no_license | create table "baskets"
(
id serial,
client_id int not null unique references clients (id),
primary key (id)
);
| true |
a7afa36843712ded0e41ddee589525072d84051f | SQL | lucassfreed/ListaSQL | /Listas.sql | UTF-8 | 25,180 | 3.296875 | 3 | [] | no_license | #Lista 01
#Exercício 01
1:
DROP DATABASE IF EXISTS ex01;
CREATE DATABASE ex01;
2:
USE ex01;
CREATE TABLE pessoas(
nome VARCHAR(100),
cpf VARCHAR(14),
rg VARCHAR(12),
data_de_nascimento Date,
idade TINYINT
);
3:
INSERT INTO pessoas (nome, cpf, rg, data_de_nascimento, idade)
VALUES
('Erick Bryan Enrico... | true |
929e94f0e49586077f5eaa2e1e4465319d95161e | SQL | AlexusBlack/alexusEngine | /siteEngine2.sql | UTF-8 | 8,026 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.3.2
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Мар 03 2013 г., 15:08
-- Версия сервера: 5.1.49
-- Версия PHP: 5.3.3-1ubuntu9.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARA... | true |
5454228386336eb793e2d9abfe5b802b6ed5ecc0 | SQL | Corondo1/POOP_Large_Project | /yeet_setup.sql | UTF-8 | 910 | 3.734375 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS Users (
id INT(11) NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY (name)
);
CREATE TABLE IF NOT EXISTS Pages (
id INT(11) NOT NULL AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
editor_id INT(11) NOT NU... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.