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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a8e0b41b1b96da1f054a18e99eb927037df13dad | SQL | niandc-developer/Chatbot-Manage | /logic/ddl/TRAINING_RELEVANCE.ddl | UTF-8 | 364 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE TRAINING_RELEVANCE(
QUERY_ID INTEGER NOT NULL,
DATA_ID INTEGER NOT NULL,
RELEVANCE INTEGER NOT NULL,
INSERT_USER VARCHAR(50),
INSERT_TIME TIMESTAMP DEFAULT,
UPDATE_USER VARCHAR(50),
UPDATE_TIME TIMESTAMP DEFAULT,
PRIMARY KEY (QUERY_ID,DATA_ID),
FOREIGN KEY (QUERY_ID) R... | true |
334ff17949bf499af47a7d15ed064a024520d9df | SQL | geodesicsolutions-community/geocore-community | /src/upgrade/versions/7.3/main.sql | UTF-8 | 2,306 | 3.171875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | #All queries in this file will be run. Comments should be
# on lines by themselves, and start with # or --
# Queries should end with ;
# All queries in this file are considered required, if it
# fails, the upgrade will stop. If you dont want this,
# see the conditional_sql.php file.
# NOTE: These queries should be a... | true |
0a7312d95cabd6ac41170f3753cb0b351c415a06 | SQL | 18810326862/Python_study_120191080516 | /homework/homework10/studentinfo.sql | UTF-8 | 2,279 | 3.171875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : root
Source Server Version : 80022
Source Host : localhost:3306
Source Database : python_test
Target Server Type : MYSQL
Target Server Version : 80022
File Encoding : 65001
Date: 2021-05-23 16:12:39
*/
SET FOREIGN_KEY_CHECKS=0;
-- --... | true |
f91192835eca6b548855ca0d02dc327131ef01c4 | SQL | mbonifasi2019139/tonyes-kinal | /DBTonysKinal2019139.sql | UTF-8 | 24,102 | 3.5625 | 4 | [] | no_license | /*
Programador:
Bonifasi de León, Marcos Daniel
2019-139
IN5AM
Creación:
20/03/2020
Creacion de las entidades:
1. TipoPlato
2. Productos
3. Platos
4. Productos_has_Platos
5. TipoEmpleado
6. Empleados
7. Empresas
... | true |
3979872b6f3d7fb959f10e6414824f212d9cb6d9 | SQL | krohitdev/savex-app-codeigniter | /database/savex_db (2).sql | UTF-8 | 3,004 | 3.140625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 03, 2019 at 03:24 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
9dc0dc745ea80299143ae83c4e2e8ca95bd94375 | SQL | hreso110100/Data_warehousing | /WH/mig2.sql | UTF-8 | 3,811 | 3.796875 | 4 | [] | no_license | #Indexy
-- ALTER TABLE `Citacie` ADD INDEX(`fkroky`);
-- ALTER TABLE `Katedra` ADD INDEX(`Fakulta_idFakulta`);
-- ALTER TABLE `Katedra_has_Zaznam` ADD INDEX(`Katedra_idKatedra`);
-- ALTER TABLE `Katedra_has_Zaznam` ADD INDEX(`Zaznam_idZaznam`);
-- ALTER TABLE `Zaznam` ADD INDEX(`fkmesta`);
-- ALTER TABLE `Zaznam` ADD I... | true |
0a7c8ceff12d64610f6a3713f1c87932f9c6c485 | SQL | IgorMaksymov/mobilunity | /src/main/resources/db/migration/V1.2__create_profile.sql | UTF-8 | 282 | 3.09375 | 3 | [] | no_license | CREATE TABLE PROFILE (ID BIGINT CONSTRAINT PROFILE_PK PRIMARY KEY,
FIRST_NAME VARCHAR(255),
LAST_NAME VARCHAR(255),
FOREIGN KEY (ID) references ACCOUNT(ID) ON UPDATE CASCADE ON DELETE CASCADE
)
| true |
b73721f908fbf587f823e1ca5da4376ccecd067f | SQL | acsellers/db | /db_test_postgres.sql | UTF-8 | 3,844 | 3.53125 | 4 | [
"BSD-2-Clause"
] | permissive | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
ALTER TABLE ONLY public."user" DROP CONSTRAINT unique_name;
ALTER TABLE ONLY pub... | true |
f0d89cef5a1e84ed61cbeeca1f96cd7510b2153a | SQL | cruzer45/ilearn-gms | /iLearn/db/ilearn/class rank query.sql | UTF-8 | 369 | 3.578125 | 4 | [] | no_license | SELECT `graStuID` AS 'Student ID',`graClsCode` AS 'Class', AVG(`graFinal`) AS 'Average', CONCAT_WS(' ',`stuFirstName`, `stuLastName`) AS 'Name', `trmShortName` AS 'Term'
FROM `Grade`
INNER JOIN `Student` ON `Grade`.`graStuID` = `Student`.`stuID`
INNER JOIN `Term` ON `Grade`.`graTrmCode` = `Term`.`trmID`
GROUP BY `g... | true |
b5d77b86e28546bec0bc84d30b2c728e731ec59a | SQL | kokomekeke/WXK4W4_DBGYAK | /6.het/wxk4w4_63.sql | UTF-8 | 4,535 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: _63
-- ------------------------------------------------------
-- Server version 8.0.22
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4010... | true |
722240aa732492b43701e8514ab757fdec7356ab | SQL | raph0424/Projet_Juillet | /Recap.sql | UTF-8 | 5,325 | 3.515625 | 4 | [
"MIT"
] | permissive | Drop Database if exists Recap ;
Create database Recap ;
Use Recap ;
#------------------------------------------------------------
# Table: Classe
#------------------------------------------------------------
CREATE TABLE Classe(
id_classe Int Auto_increment NOT NULL ,
Diplome Varchar (50) NOT NULL... | true |
c234e9c4262320114d2e71ffc5c9951ce46c5490 | SQL | anandeka/my-project | /DBScripts/EODScripts/MITSDemoMar2012/MV_BI_UPAD.sql | UTF-8 | 1,388 | 3.453125 | 3 | [] | no_license | drop materialized view MV_BI_UPAD;
create materialized view MV_BI_UPAD
refresh force on demand
as
select tdc.corporate_id,
profit_center_id,
profit_center_name,
product_id,
product_name,
attribution_main_type attribution_type,
attribution_order,
contract_ref_n... | true |
f2766933db57646b700e78168ca30ebcffdfb4af | SQL | data-githu/SQL | /[SQL] INSERT INTO ~ VALUES.sql | UHC | 2,065 | 4.40625 | 4 | [] | no_license |
078 Էϱ(INSERT)
"̺ Էϴ SQL "
Է ÷
: insert into emp (empno, ename, sal)
values(1234, 'jack', 4500);
÷
295. ̺ Ʒ ԷϽÿ
ȣ 2939
̸ jane
4700
Ի ó¥
insert into emp (empno, ename, sal, hiredate)
values(2939,'jane',4700,'20/11/05');
296. Ի ̸ Ի Ͻÿ!
select ename, hiredate
... | true |
3d2a247fa1af871daaf84f65fc10143a3fd10b09 | SQL | s18005/oracle | /0212/0212.1.sql | UTF-8 | 250 | 2.671875 | 3 | [] | no_license | create table member (
member_id number(10)
constraint member_member_id_pk primary key,
last_name varchar2(25) not null,
first_name varchar2(25),
address varchar2(100),
city varchar2(30),
phone varchar2(15),
join_date date default sysdate not null
);
| true |
bf5ea93b56ed6098dfedef81738c3449a72b4542 | SQL | anjali13942/Training | /postgres/pg_catalog/functions/pg_sleep_for.sql | UTF-8 | 437 | 2.546875 | 3 | [] | no_license | CREATE OR REPLACE FUNCTION pg_catalog.pg_sleep_for(interval)
RETURNS void
LANGUAGE sql
PARALLEL SAFE STRICT COST 1
AS $function$select pg_catalog.pg_sleep(extract(epoch from pg_catalog.clock_timestamp() operator(pg_catalog.+) $1) operator(pg_catalog.-) extract(epoch from pg_catalog.clock_timestamp()))$function$
;
A... | true |
f17fde2e82d0120a4e6c41d48a050f8de47ef69e | SQL | ACabrejas/DeviationsFromProfile | /5. Cloud/Database/sites.sql | UTF-8 | 641 | 3.71875 | 4 | [] | no_license | --Create sites table
CREATE TABLE sites(
site_id CHAR(32) NOT NULL PRIMARY KEY COMMENT 'Unique identifier of the loop site',
site_reference VARCHAR(20) NOT NULL COMMENT 'Unique reference of the loop site',
link_id INT NOT NULL COMMENT 'Unique identifier of the network link',
distance_along FLOAT NOT NULL COMMENT 'Dist... | true |
ce121f358e5983894b976e8b2d182413d83c7775 | SQL | sarakhmen/spring-final-project | /src/test/resources/testDataUserService.sql | UTF-8 | 1,988 | 2.609375 | 3 | [] | no_license | INSERT INTO roles (role) VALUES ('ADMIN');
INSERT INTO roles (role) VALUES ('USER');
INSERT INTO users (active, email, password, user_name) VALUES (true, 'artur.sarahman@gmail.com', '$2a$12$IcsJIPLyMdHog5ntehnhW.9eMn7J9U1iR3d8hpoJHjWeCLavwdrSm', 'Artur Sarakhman');
INSERT INTO user_role (user_id, role_id) VALUES (1, 1)... | true |
688422716555c181140f94ba37fa8d60c121b349 | SQL | HNGInternship/HNGFun2 | /profiles/hng_fun.sql | UTF-8 | 2,721 | 2.90625 | 3 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 ... | true |
f276d0bd25c21fa3a8de65cc9c9a12f7dfe5d462 | SQL | KaveeshaW/SQL-BasicOperationsII | /answers/exercise2.sql | UTF-8 | 137 | 2.828125 | 3 | [] | no_license | SELECT * FROM Students
WHERE City LIKE "a%"
OR City LIKE 'c%'
OR City LIKE 's%';
SELECT * FROM Students WHERE City REGEXP '^[acs]'; | true |
0be3770a12ed245cf9f09bd25914e901d85fa82d | SQL | jhonamg/spoc-v.2 | /bd/competencia.sql | UTF-8 | 1,603 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 19-05-2020 a las 02:56:24
-- 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 |
603a3cb8e69cd58f08a35daa495fe82ade3a2254 | SQL | koallen/leetcode-database | /180_consecutive_numbers.sql | UTF-8 | 172 | 3.375 | 3 | [] | no_license | SELECT DISTINCT L1.Num AS ConsecutiveNums
FROM Logs L1
JOIN Logs L2
ON L1.Num = L2.Num
JOIN Logs L3
ON L2.Num = L3.Num
WHERE L2.Id - L1.Id = 1
AND L3.Id - L1.Id = 2;
| true |
9850490980f0a454abd3707788949c39bb4ecf65 | SQL | darius-niang/student3 | /taken.sql | UTF-8 | 20,186 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : ven. 26 fév. 2021 à 18:05
-- Version du serveur : 10.4.14-MariaDB
-- Version de PHP : 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... | true |
22aeec46bd18b316653a5dcb60399024fbd7f745 | SQL | MaxiMRuiz/RacesManagement | /scripts/create_database.sql | UTF-8 | 8,317 | 3.78125 | 4 | [] | no_license | # CREATE DATABASE
CREATE DATABASE race_management_db;
# CREATE USER
CREATE USER 'racemgmt'@'%' IDENTIFIED BY 'RaceManagement';
GRANT EXECUTE, PROCESS, SELECT, SHOW DATABASES, SHOW VIEW, ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TABLESPACE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, IN... | true |
66fbbb3887e15a7dd1c0b53e4dd7ed87da31527b | SQL | bhavanij2/GigyaProjects | /user-registration-service/database/ddl/table.public.user_location_role_new.sql | UTF-8 | 1,188 | 3.65625 | 4 | [] | no_license | -- Table: public.user_location_role
-- DROP TABLE public.user_location_role;
CREATE TABLE public.user_location_role
(
id integer NOT NULL,
user_id uuid NOT NULL,
sap_id character varying(255) COLLATE pg_catalog."default" NOT NULL,
role_id character varying(255) COLLATE pg_catalog."default" NOT NULL,
... | true |
0ab584d9e0bb303c895238048cfa5b35a7a411e1 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/Scripts Complementarios/IAXIS-4550/CreacionParametros.sql | UTF-8 | 3,328 | 2.71875 | 3 | [] | no_license | --select * from cfg_lanzar_informes_params
--where cmap='ListadoNominaContratos';
--select * from cfg_lanzar_informes_params
--where cmap='ListadoCondicionContratosProp';
--select * from cfg_lanzar_informes_params
--where cmap='ListadoCondicionContratosNoProp';
--NOMINA DE CONTRATOS
--Parametro Tipo de Contrato
INSE... | true |
d21880cbdeda818ba1509f6b59cb45d0e2b5b605 | SQL | Sandra-yo/Proyecto-Punto-de-Venta | /Punto de venta/build/classes/Extras/Ferreteria.sql | UTF-8 | 5,380 | 3.078125 | 3 | [] | no_license | create database FerreteriaTop;
use FerreteriaTop;
create table clientes(
id_cliente int,
R_social varchar(15),
RFC varchar(20),
tipo varchar(10),
id_person_fk int);
create table persona(
id_person int,
nombre varchar(10),
apellido_1 varchar(10),
apellido_2 varchar(10),
direccion varchar(18),
colonia varchar(10),
corr... | true |
27fde7a9633971b77654ba900bcc926e6c3a5b2d | SQL | huangmatthieu/Projet_BD_siteWeb | /PHP/CREATEBASE/Films.sql | UTF-8 | 5,995 | 3.375 | 3 | [] | no_license | # Fichier Films.sql
# Creation et remplissage de la table FILMS
DROP TABLE FILMS;
CREATE TABLE FILMS
( NoFilm smallint PRIMARY KEY,
Titre varchar(80) NOT NULL,
Nationalite varchar(30),
Realisateur varchar(40),
Couleur enum("Couleurs","Noir et Blanc") NOT NULL,
Annee year,
Genre enum("Comédie","Comédie d... | true |
e7345b5d37ec46d28eca89c4a50f06b04f05aeef | SQL | oluwajolasun/ENSF607_TermProject | /DBFiles/toolshopDB.sql | UTF-8 | 2,219 | 3.890625 | 4 | [] | no_license | DROP DATABASE IF EXISTS toolshop;
CREATE DATABASE toolshop;
USE toolshop;
DROP TABLE IF EXISTS supplier;
CREATE TABLE supplier (
supplierId INTEGER NOT NULL,
sName VARCHAR(25),
sType VARCHAR(15),
address VARCHAR(50),
cName VARCHAR(25),
phone VARCHAR(12),
PRIMARY KEY (supplierId)
);
DROP TABLE IF EXISTS internat... | true |
9678c0e7b98a60130c5643c2925975f24a27d627 | SQL | cygnauh/serveurMachine | /machine_a_histoires_2018-04-20.sql | UTF-8 | 3,943 | 3.234375 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Hôte: 127.0.0.1 (MySQL 5.7.21)
# Base de données: machine_a_histoires
# Temps de génération: 2018-04-20 15:16:06 +0000
# ************************... | true |
5564e8c8c323f25f1dbcd5811ba0012016529dc0 | SQL | caf3sua/agency-service | /src/main/resources/sql/AGENT_ROLE_PERMISSION.sql | UTF-8 | 1,149 | 3.453125 | 3 | [] | no_license |
CREATE TABLE "TRADEOL"."AGENT_ROLE_PERMISSION"
( "ROLE_NAME" VARCHAR2(64 BYTE) NOT NULL ENABLE,
"PERMISSION_NAME" VARCHAR2(64 BYTE) NOT NULL ENABLE,
CHECK ("ROLE_NAME" IS NOT NULL) ENABLE,
CHECK ("PERMISSION_NAME" IS NOT NULL) ENABLE,
PRIMARY KEY ("ROLE_NAME", "PERMISSION_NAME")
USING INDEX PCTFREE ... | true |
ba7dd17cceb9454d01c400774d772eff50035c0b | SQL | rack82/restlet-app | /src/main/sql/ModelDB.sql | UTF-8 | 4,856 | 3.359375 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `ModelDB` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `ModelDB`;
-- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 5.6.24-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
366f58c1680fca8b8b2825e0b942f3eaff4199dd | SQL | chekulhanseim/Desarrollo-de-Aplicaciones-NET | /SQL Server/Reto 3 SQL Server y Funciones/SQLSuperheroes.sql | UTF-8 | 2,280 | 3.03125 | 3 | [] | no_license | /* Marvel Heroes and Villains
Based on the website http://marvel.wikia.com/Main_Page
with popularity data from http://observationdeck.io9.com/something-i-found-marvel-character-popularity-poll-cb-1568108064
and power grid data from http://marvel.wikia.com/Power_Grid#Power
Collected by: https://www.khanacademy.... | true |
323618a8bc168f509f87674840d559dfd40e4846 | SQL | A-SmallCoder/info2180-basic-security | /schema.sql | UTF-8 | 974 | 3.5 | 4 | [] | no_license | -- Sample Schema
-- Users
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id int unsigned auto_increment,
username varchar(255) not null,
password varchar(255) not null,
email varchar(255) not null,
created_at datetime not null,
primary key(id)
);
-- Add an initial user
INSERT INTO users (use... | true |
2abefa7dcfdaa3dcc367be860fce6955f6accb0a | SQL | LuisaEsther/lab-sql-3 | /lab-sql-3.sql | UTF-8 | 1,279 | 4.03125 | 4 | [] | no_license | -- How many distinct (different) actors' last names are there?
select * from actor;
select distinct(last_name) from actor;
-- In how many different languages where the films originally produced? (Use the column language_id from the film table)
select * from film;
select distinct(language_id) from film;
-- How many movi... | true |
b6c1c134f2ffbb9a6b7b7debbed3a242d65244c1 | SQL | VenelinBakalov/javaAdvanced | /Databases Basics/Exam-Preparation-II/07_chats.sql | UTF-8 | 163 | 3.265625 | 3 | [] | no_license | SELECT c.title, c.is_active
FROM `chats` AS c
WHERE (c.is_active = false
AND CHAR_LENGTH(c.title) < 5) OR SUBSTRING(c.title, 3, 2) = 'tl'
ORDER BY c.title DESC;
| true |
8b85810975f20f9a7b4a40f18864d1ca74c41d59 | SQL | lychristy/SQL | /Leetcode/1341. Movie Rating.sql | UTF-8 | 947 | 4.0625 | 4 | [] | no_license | SELECT *
FROM
(SELECT top 1 u.name AS results
FROM Movie_Rating mv
LEFT JOIN Users u ON mv.user_id = u.user_id
GROUP BY u.name
ORDER BY count(*) DESC, u.name) t1
UNION
SELECT *
FROM
(SELECT top 1 m.title AS results
FROM Movie_Rating mv
LEFT JOIN Movies m ON mv.movie_id = m.movie_id
WHERE mv.cre... | true |
c0172ed2bb7bb899130f41609550b61db2359f3b | SQL | aznjp/employeetracker | /db/seeds.sql | UTF-8 | 487 | 2.875 | 3 | [
"MIT"
] | permissive | INSERT INTO department (name)
VALUES ("Human Resources"), ("R&D"), ("Engineering"), ("Accounting"), ("Sales");
INSERT INTO role (title, salary, department_id)
VALUE ("Manager", 125000, 1), ("Scientist", 57500, 2),("Engineer", 65000, 3),("Accountant", 82500, 4) , ("Sales-Representative", 85650, 5);
INSERT INTO employ... | true |
8c3f3684a41a21c902ee18c800b6f998eff91f41 | SQL | BrettFX/IS410_ProjPart4 | /proj_qeu.sql | UTF-8 | 1,494 | 3.5625 | 4 | [] | no_license | --IS410 Term Project (Deliverable 4)
--By: Brett Allen, Akhil Naraparaju, and Justin Chan
--Make at least ten different sample queries
DROP VIEW Customer_Payment_Instersection;
DROP VIEW Customer_Payment_Union;
DROP VIEW Cheap_Instrument;
SELECT Customer_First_Name FROM Customer WHERE Customer_Phone='443-255-1892';
-... | true |
47b6f0b4e104f88a30e744a4be4feab46ac17066 | SQL | OrbitalEnterprises/evekit-frontend-services | /sample_schema.sql | UTF-8 | 93,691 | 2.796875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `evekitdb_2_1_0` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `evekitdb_2_1_0`;
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64)
--
-- Host: localhost Database: evekitdb_2_1_0
-- ------------------------------------------------------
-- Server version 5.6.27-log
/*!40101 SET @OL... | true |
500801c180f898153742faf7bbe72c0d691f72e7 | SQL | DredgenRinz/CodingDojo | /MySQL/MySQL_Queries/countries/queries.sql | UTF-8 | 1,563 | 3.609375 | 4 | [] | no_license | use world;
/*1*/
select c.name, l.language, l.percentage from countries as c join languages as l on c.id = l.country_id where l.language = "Slovene" order by l.percentage desc;
/*2*/
select c.name as Pais, count(ci.id) as Ciudades from countries as c join cities as ci on c.id = ci.country_id group by c.name order by Ci... | true |
8ea94a72d70e58c55d6fdc4fe8e288550cc08740 | SQL | HelloKittyNII/SpringMVC | /user.sql | UTF-8 | 687 | 2.828125 | 3 | [] | no_license | CREATE TABLE 'user' (
'id' int(11) NOT NULL AUTO_INCREMENT,
'username' varchar(32) NOT NULL COMMENT '用户名称',
'birthday' date DEFAULT NULL COMMENT '生日',
'sex' char(1) DEFAULT NULL COMMENT '性别',
'address' varchar(256) DEFAULT NULL COMMENT '地址',
PRIMARY KEY ('id')
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHAR... | true |
dc1fd798e7b6851f519fbe732b80fe381602a083 | SQL | oMitrokhin/dbisworkshops | /km-52/Mitrokhin_Oleksii/workshop5/sql/create.sql | UTF-8 | 4,719 | 3.953125 | 4 | [] | no_license | alter table User_product
drop constraint FK_PRODUCT_SOLD;
alter table User_product
drop constraint FK_USER_HAS_PRODUCT;
alter table "User"
drop constraint "FK_USER_USER'S RO_ROLE";
drop index "User's role_FK";
drop index "Products sold_FK";
drop index "User has products_FK";
drop table ... | true |
7e1fbf094906776d46c4df3d1b77544a013f323c | SQL | joeishak/Megatron-Backend | /DML Scripts/InsertMetrics.sql | UTF-8 | 3,394 | 2.890625 | 3 | [] | no_license | insert into metrics ( name, description)
values ('Finance Net New ARR','NetNewARR'),
('Finance Gross New ARR','GrossNewARR'),
('Finance Cancellations ARR','Cancellations ARR'),
('Finance Renewal@FP ARR','Renewal@FPARR'),
('Discover Marketable Universe','MarketableUniverse'),
('Discover Traffic','Traffic'),
('Discover U... | true |
b1eeb0af2f96afba4f501b58b3fe629e12eb3ada | SQL | sbracellari/SYB-Bank | /Database/Procedures/deleteBankAccount.sql | UTF-8 | 1,109 | 4.1875 | 4 | [] | no_license | DELIMITER $$
CREATE DEFINER=`admin`@`%` PROCEDURE `deleteBankAccount`(acctnum int(11))
BEGIN
DECLARE M INT;
DECLARE S INT;
-- This checks to see if the selected account for deletion is a money market account
-- If so, M recieves a value of 1, else 0.
SELECT COUNT(`ACCOUNT`.ACCT_ID) INTO M FROM MONEYMARKET
INNER JOIN `... | true |
f212e89d681a616b1c80d97b56f9ad6d8b66ce9c | SQL | aitortarazaga/procedimientos | /visualizarLista.sql | UTF-8 | 1,291 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive | SET SERVEROUTPUT ON;
CREATE OR REPLACE PROCEDURE visualizar_lista_centro
IS
CURSOR C_CENTRO IS SELECT ID, NOMBRE, CALLE, NUMERO, CP, CIUDAD, PROVINCIA, TELEFONO FROM CENTROS;
E_CENTRO_NO_ENCONTRADO EXCEPTION;
REG_CENTRO C_CENTRO %ROWTYPE;
E_MOSTRAR_CENTRO EXCEPTION;
BEGIN
BEGIN
OPEN C_CENTRO;
LOOP
... | true |
b6fb7750b738e6ce05614e562605376e36be5d67 | SQL | tuankhac/backup_data_141 | /WEB-INF/templates/tien_nop/script.sql | UTF-8 | 3,920 | 3.265625 | 3 | [] | no_license | function new_tien_nop(
pma_bc varchar2,
pma_nv varchar2,
pngay_nop varchar2,
ptien varchar2,
pnguoi_cn varchar2,
pngay_cn varchar2,
pip_cn varchar2,
pid varchar2,
pnoi_dung varchar2,
pUserId varchar2,
pUserIp varchar2)
return varchar2
is
s varchar2(1000);
begin
logger.access('tax.tien_nop|NEW',pma_bc||'|'|... | true |
47fc1e7fe7caa9d4907d2703831cf00d842419fd | SQL | Ojaswi2223/DBMS | /PLSQL_BASICS/max_gpa.sql | UTF-8 | 344 | 2.828125 | 3 | [] | no_license | /*
Maximum gpa of students
*/
declare
g studenttable.gpa%Type;
r studenttable.rollno%Type;
m studenttable.gpa%Type;
begin
m := 0;
for r in 1..6 loop
select gpa into g from studenttable where rollno=r;
if (g>=m) then
m:=g;
end if;
end loop;
dbms_output.put_line('The gpa of the student is '... | true |
0f1d032eac06441dcbb74c0bb9c5cd85d1af87b0 | SQL | TS22082/cli-tasks | /seed.sql | UTF-8 | 388 | 3.09375 | 3 | [] | no_license | DROP DATABASE IF EXISTS todo_db;
CREATE DATABASE todo_db;
USE todo_db;
CREATE TABLE todos (
id INT NOT NULL AUTO_INCREMENT,
text VARCHAR(80) NOT NULL,
completed BOOLEAN DEFAULT false,
PRIMARY KEY (id)
);
INSERT INTO todos(text)
VALUES ("Mysql programmers get a lot of money");
INSERT INTO todos(text)
VALUES (... | true |
69f7d733788f77200229236bfd65746e9a50e46d | SQL | tphummel/tetris-report | /PyTom/Data/procs/func_get_location_name.sql | UTF-8 | 500 | 3.828125 | 4 | [] | no_license | DELIMITER $$
DROP FUNCTION IF EXISTS get_location_name$$
CREATE FUNCTION get_location_name(in_locationid INT, in_type VARCHAR(10))
RETURNS VARCHAR(50)
BEGIN
DECLARE v_location VARCHAR(50);
IF UPPER(in_type) = 'ADDY' THEN
SElECT CONCAT(locationname, ' (', city, ', ', state,')')
INTO v_location
FROM location
... | true |
cff64478c65db51a9eb652ecdf69e9867ffac884 | SQL | usefulmana/RPI-GreenHouseMonitor | /sql_statements.sql | UTF-8 | 1,291 | 3.6875 | 4 | [] | no_license | create table data_log (
id int not null auto_increment primary key,
date datetime not null,
temperature float not null,
humidity float not null
);
create table daily_notification(
id int not null auto_increment primary key,
record_date date unique not null,
status varchar(255) not null
);
... | true |
6f1462244236eda46f72bc42855f6c25835d1ed9 | SQL | tree3170/awesome-tree-practise | /spring-web-skeleton/doc/db.sql | UTF-8 | 567 | 2.90625 | 3 | [] | no_license | CREATE TABLE `u_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nickname` varchar(20) DEFAULT NULL COMMENT '用户昵称',
`email` varchar(128) DEFAULT NULL COMMENT '邮箱|登录帐号',
`pswd` varchar(32) DEFAULT NULL COMMENT '密码',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`last_login_time` datetime DEFAULT NULL ... | true |
780d0a14f9751828f8138968cd9556924e48b376 | SQL | DomWhite/WDI-Coursework | /05_database/intro/student.sql | UTF-8 | 1,361 | 3.8125 | 4 | [] | no_license | -- CAPITALISED LETTERS AREN'T NECESSARY
CREATE TABLE students
-- \c students to connect to database
(
id SERIAL4 PRIMARY KEY, --generates unique key
firstname VARCHAR(30), -- (30) here sets the limit of input characters
lastname VARCHAR(50),
dob DATE,
gpa FLOAT8
);
--\dt to display table
--DROP TABLE students... | true |
561852859f9b0b02d0808f8e0565ac97bc0dac73 | SQL | pingting420/LeetCode_SQL_Solutions | /Medium/LC512. Game Play Analysis II.sql | UTF-8 | 165 | 3.5 | 4 | [] | no_license | select player_id, device_id
from activity
where (player_id, event_date)
in (select player_id, min(event_date)
from activity
group by player_id)
'''
union select
''' | true |
0b228518001073dc05e4b6c72bd34f9f1d476c05 | SQL | vsolv/BigFin | /Bigflow/DB/SPS/FA/sp_FAAssetCategory_Set.sql | UTF-8 | 13,043 | 3.25 | 3 | [] | no_license | CREATE PROCEDURE `sp_FAAssetCategory_Set`(IN `ls_Action` varchar(32),IN `ls_Type` varchar(32),
IN `ls_Sub_Type` varchar(32),IN `lj_Details` json,IN `lj_Classification` json,IN `ls_Createby` varchar(32),
OUT `Message` varchar(1024))
sp_FAAssetCategory:BEGIN
#### Bala Oct 25 2019
Declare errno int;
Declare msg varchar(1... | true |
38dda2c7cc40978623ebab85263df921d04951df | SQL | frankusu/streamline | /insert_all_data.sql | UTF-8 | 7,975 | 3.234375 | 3 | [] | no_license | /*
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- ||||... | true |
084646125e6cd1b70522a7a40512e65c6ab5b0e8 | SQL | chakfung2/Testing | /sql_ex_1-50.sql | UTF-8 | 17,800 | 4.3125 | 4 | [] | no_license | --http://www.sql-ex.ru/
--Select Ex 1-50
--Oracle
--
--
--
--1. Find the model number, speed and hard drive capacity for all the PCs with prices below $500.
-- Result set: model, speed, hd.
SELECT
model,
speed,
hd
FROM
pc
WHERE
price < 500
;
--2. List all printer makers. Result set: maker.
SELE... | true |
21d215bde8d7faa69f27daaef970567aa210947d | SQL | ShunShj/shj | /common/soa_develop/.svn/pristine/98/9821404fd3c7ffc5b45ecfa91d984ba66309a5f4.svn-base | UTF-8 | 19,419 | 3.3125 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2019-05-05 11:02:01
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
6407597bee77845ec9b1c45a7fc00e895d8d0278 | SQL | Shreyas-Sadavarte/Curious-Wrangler | /points.sql | UTF-8 | 6,578 | 2.703125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 19, 2019 at 01:36 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 |
150f28e8e062ee3246593b0fba1159c02a55192d | SQL | wir0x/cow | /db/script versioning/v1.7.sql | UTF-8 | 6,800 | 3.15625 | 3 | [] | no_license | -- CONFIGURATION FOR VERSION 1.7
INSERT INTO configurations (description, key_, value) VALUES ('default group id for app users', 'default.app.user.group.id', '31');
INSERT INTO configurations (description, key_, value) VALUES ('free service plan id', 'free.service.plan.id', '1');
INSERT INTO configurations (description... | true |
92739c606d3ea6140b008021bf082abc1d90a047 | SQL | felipestgoiabeira/projeto-ceuma | /banco-dados/BancoDadosSQL.sql | UTF-8 | 3,673 | 3.046875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.27, for Linux (x86_64)
--
-- Host: localhost Database: desafio-ceuma
-- ------------------------------------------------------
-- Server version 5.7.27-0ubuntu0.18.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC... | true |
ab88c253ee1252811324b04fc84b2e0e4cec1277 | SQL | kangdoohyun/peace | /schema.sql | UTF-8 | 21,049 | 3.734375 | 4 | [] | no_license | DROP DATABASE IF EXISTS peaceSystemBuild;
CREATE DATABASE peaceSystemBuild;
USE peaceSystemBuild;
# 직업에 대한 테이블 생성
CREATE TABLE `role`(
id INT(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT '사용자 직업 (0 = 에러, 1 = 관리자, 2 = 회원, 3 = 장례지도사)',
regDate DATETIME NOT NULL,
updateDate DATETIME NOT NULL,
roleNa... | true |
c21dd18a43e21e2a0b0635c228ade88a5896c09d | SQL | Stephan-Pauld/SQLdbs | /4_queries/4_total_teacher_ass_reqs.sql | UTF-8 | 156 | 3.28125 | 3 | [] | no_license | SELECT COUNT(teacher_id) as total_assistances, name
FROM teachers
JOIN assistance_requests
ON teachers.id = teacher_id
WHERE name = 'Waylon Boehm'
GROUP BY name; | true |
28f82932927a87700a84c95d9b604f03cd103369 | SQL | icetonges/WK9-SQL | /sql-challenge/Part II/01_hw_unions.sql | UTF-8 | 1,323 | 4.65625 | 5 | [] | no_license | --Use the rental_db database that was created during exercise 1 of Unit 9.2
select * from actor
select * from staff
select * from customer
select * from customer_list
--Create a view, called all_parties using UNION and write a PostgreSQL statement to return all of the actors, staff, and customers. Return the first_na... | true |
d7abeb8cf04ca08619395bd971d62a9741d30793 | SQL | joshieholt/rental | /src/main/sql/apartments.sql | UTF-8 | 417 | 2.640625 | 3 | [] | no_license | DROP TABLE IF EXISTS apartments;
CREATE TABLE apartments (
id BIGSERIAL PRIMARY KEY NOT NULL,
rent INT NOT NULL,
number_of_bedrooms INT NOT NULL,
number_of_bathrooms NUMERIC(4,2) NOT NULL,
square_footage INT NOT NULL,
address VARCHAR(255) NOT NULL,
city VARCHAR(255) NOT NULL,
state VARCHAR(50) NOT NULL,
zip_c... | true |
272000ee32a630743913f06aab8199722c903b0b | SQL | dbanalyticsco/usaa-dbt-course | /models/stg_snapshot__customers.sql | UTF-8 | 324 | 2.96875 | 3 | [] | no_license | with base as (
select *
from {{ ref('customers_snapshot') }}
), fields as (
select
id as customer_id,
first_name,
last_name,
email,
address,
phone_number,
created_at,
_dbt_valid_from,
_dbt_valid_to
from base
)
select *
from fi... | true |
e7b7af9e5dc109952fecb363e4ce687242d0cc53 | SQL | CUBRID/cubrid-testcases | /sql/_14_mysql_compatibility_2/_15_host_variable/_01_abs_cfg_null_on_errors/cases/collection.sql | UTF-8 | 390 | 2.984375 | 3 | [
"BSD-3-Clause"
] | permissive | --- collection
--+ holdcas on;
set system parameters 'return_null_on_function_errors=yes';
prepare st from 'select abs(?)';
execute st using {12,12.2};
create table t1 (s1 set(int, double));
insert into t1 values ({123,1.12312e1});
select abs(s1) from t1;
drop table t1;
select abs({12,12.2});
set system par... | true |
b439af6a0be0455074dd6a827e115d6d3506859f | SQL | villdimova/SoftUni-MicrosoftSQLServer | /Exam 20.10.2019/5.Unassigned Reports.sql | UTF-8 | 137 | 3.15625 | 3 | [
"MIT"
] | permissive | SELECT [Description],
FORMAT(OpenDate,'dd-MM-yyyy')
FROM Reports r
WHERE r.EmployeeId IS NULL
ORDER BY r.Opendate,[Description]
| true |
e41cb240641eaccf65440f93d745aab2c252af6b | SQL | cswormstedt/WhereInTheWorld | /whereInTheWorldApp/server/db/migration.sql | UTF-8 | 312 | 2.578125 | 3 | [
"MIT"
] | permissive | -- psql -a -f migration.sql
CREATE DATABASE whereApp;
\c whereApp;
CREATE TABLE users (id SERIAL PRIMARY KEY, username varchar(255), password_digest varchar(255));
CREATE TABLE places (id SERIAL PRIMARY KEY, latitude varchar(255), longitude varchar(255), time varchar(255), user_id INT references users(id)); | true |
a2e193f5520ba0157925e0fbceedde0d4b45e155 | SQL | peerchen/oracle-extracts | /694R.sql | UTF-8 | 856 | 3.5 | 4 | [] | no_license | select count (*)
from fctemp.TMP_COE_ORDER_LINES ol
where ol.RETURN_ORDER_NUMBER is not null
or ol.REFERENCE_ORDER_LINE_ID is not null
select ol.order_number, cu.customer_number, ol.return_order_number, ol.creation_date, ol.shipped_quantity, ol.unit_selling_price, ol.unit_tax_amount
from frc.COE_ORDER_LINES@rc... | true |
698ca3a7035f09d2201bca0d76a8501d13a2a4b7 | SQL | MohamedDerbali/Hospital-management-app | /pidev (1).sql | UTF-8 | 17,764 | 3.21875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : ven. 01 mars 2019 à 03:07
-- Version du serveur : 5.7.19
-- Version de PHP : 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
987a05384ac63a7f11797e71e7ade1e7a83d40ac | SQL | guoliuqiang/springBootDemo | /src/main/resources/mysql_db_init.sql | UTF-8 | 13,671 | 3.421875 | 3 | [] | no_license | DROP TABLE IF EXISTS `t_msg_kefu`;
create table `t_msg_kefu`
(
id int(11) NOT NULL AUTO_INCREMENT,
msg_type int(11),
msg_name varchar (255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
kefu_msg_type varchar (255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
content varchar (255) C... | true |
7cc23d68afef6bd09ef9f29afc14ed47b31cc7c1 | SQL | jgarzonext/plsql-testing | /script_plsql/bd_iaxis/script/tables/CNVPRODUCTOS.sql | ISO-8859-1 | 1,959 | 2.640625 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Table CNVPRODUCTOS
--------------------------------------------------------
CREATE TABLE "AXIS"."CNVPRODUCTOS"
( "CRAMO" NUMBER(8,0),
"CMODAL" NUMBER(2,0),
"RAM_HP" NUMBER(2,0),
"MODA_HP" NUMBER(2,0),
"PRODUCTE" VARCHAR2(4 BYTE),
"PRO... | true |
883767ebc3e8420a4ae0a42c255593230f0ae053 | SQL | jaythemishra/Reddit-Sentiment-Analysis | /hi.sql | UTF-8 | 1,075 | 4.15625 | 4 | [] | no_license | CREATE SCHEMA test
CREATE TABLE test.data
(
id character varying(50),
created_utc character varying(50),
linkid character varying(50),
author_flair_text character varying(50),
title character varying(250),
body character varying(10000),
is_positive character(20) not null,
is_negative character(20) not n... | true |
af4e27d5d3fb4e055d13e2db15710bbe4b8a3baa | SQL | klpdotorg/importers | /fixes.sql | UTF-8 | 1,474 | 3.1875 | 3 | [] | no_license | delete from tb_boundary where id=8772; -- the hid is set to school for this record
INSERT INTO tb_partner (name,status,info) values ('Akshara Foundation',1,'Bangalore'); -- First partner indormation
ALTER TABLE tb_programme ADD COLUMN partnerid INTEGER default 1;
ALTER TABLE tb_programme ADD FOREIGN KEY (partnerid) REF... | true |
5251af582f5df9f1af7c77a8860f5d3fcaba74fd | SQL | Marwans93/parcel-tracking | /parcel_tracking.sql | UTF-8 | 5,990 | 2.765625 | 3 | [
"CC-BY-2.5"
] | permissive | -- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 12, 2014 at 12:33 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/... | true |
142c98cc21eb3939aeb612235680ac65a86229b8 | SQL | bitgittry/BaseCodeAnalysis | /trunk/dbv/stored_routines/TransactionChargeInactiveAccounts.sql | UTF-8 | 20,491 | 4.03125 | 4 | [] | no_license | DROP procedure IF EXISTS `TransactionChargeInactiveAccounts`;
DELIMITER $$
CREATE DEFINER=`bit8_admin`@`127.0.0.1` PROCEDURE `TransactionChargeInactiveAccounts`()
root: BEGIN
-- Misc
DECLARE CounterID, BonusCounterID BIGINT;
DECLARE CurTimeStamp DATETIME DEFAULT NOW();
DECLARE Enabled TINYINT(1) DEFAULT 0;
-- ... | true |
10634002ee14225800d942be6d63e346274d70d2 | SQL | krishbal128/side-nav-bar | /college.sql | UTF-8 | 1,376 | 2.90625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 12, 2021 at 03:27 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 7.4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
72e4c48fa5021864ada7df1e61301f8e31eee1f6 | SQL | thomazmz/twu-biblioteca-thomaz | /database/question4.sql | UTF-8 | 666 | 4.09375 | 4 | [
"Apache-2.0"
] | permissive | -- Add the book 'The Pragmatic Programmer'
INSERT INTO book (title)
VALUES ('The Pragmatic Programmer');
-- Add yourself as a member
INSERT INTO member (name)
VALUES ('Thomaz Zandonotto');
-- Check out 'The Pragmatic Programmer'.
INSERT INTO checkout_item (member_id, book_id)
VALUES (
(SELECT m.id FROM member m W... | true |
24d4f21e563621a70a1b1b9e98d541b8623036d5 | SQL | Azzam2futuerdev/Rhomicom-ERP-Compose | /db/initdb/mysqldb/backup.sql | UTF-8 | 4,300 | 2.6875 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 8.0.21, for Linux (x86_64)
--
-- Host: localhost Database: demo_flexcodesdk
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULT... | true |
f96bf48abdc084c9942f9746afc94921f30b561b | SQL | ramon-villarreal-leal/database-exercises | /index_exercises.sql | UTF-8 | 491 | 3.3125 | 3 | [] | no_license | USE employees;
describe employees;
USE codeup_test_db;
DROP TABLE IF EXISTS albums;
ALTER TABLE albums
ADD UNIQUE (artist, name);
INSERT INTO albums(artist, name)
VALUES ('Micheal Jackson','Thriller');
describe albums;
# CREATE TABLE IF NOT EXISTS albums(
# id INT UNSIGNED NOT NULL AUTO_INCREMENT,
# ar... | true |
80afcc51511698cb96526e082be290428ccca094 | SQL | Lingjingzou/CSC343-A3- | /a3/q4.sql | UTF-8 | 1,025 | 4 | 4 | [] | no_license |
DROP VIEW if EXISTS not_other_prop CASCADE;
create view not_other_prop as
select p1.pID
from Property p1, WaterProperty w1, CityProperty c1
where p1.pID = w1.pID or p1.pID = c1.pID;
DROP VIEW if EXISTS other_prop CASCADE;
create view other_prop as
select p1.pID
from Property p1 except(select p1.pID
from Property p... | true |
f5618a361273231f445e5e037ed61d766a743937 | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Views/dbo.vp_10990_ShipNotInvoice.sql | UTF-8 | 2,203 | 3.515625 | 4 | [] | no_license |
Create View vp_10990_ShipNotInvoice
As
--OM side
SELECT d.InvtID, d.SiteID, l.WhseLoc, l.LotSerNbr, l.S4Future01 AS SpecificCostID, l.QtyShip AS QtyShipNotInv, h.CpnyID
FROM SOShipHeader h
JOIN SOShipLine d ON h.CpnyID = d.CpnyID
AND h.ShipperID = d.ShipperID
JOIN SOShipLot l ON d.CpnyID = l.Cpny... | true |
7ba320fb60ad6cc0f19274f5d0bcab91cbb598e4 | SQL | oneeyedjames/polyglot | /assets/sql/user_language_map-schema.sql | UTF-8 | 201 | 2.53125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS `user_language_map` (
`user_id` int(10) unsigned NOT NULL,
`language_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`user_id`,`language_id`)
) DEFAULT CHARSET=utf8;
| true |
0b45022745de0917f83844dc319475bbd6034469 | SQL | AlaricLightin/2019-08-otus-spring-Biderman | /library/src/test/resources/db/changelog/testdata/data.sql | UTF-8 | 731 | 2.6875 | 3 | [] | no_license | INSERT INTO genres(id, genre_text) values ( 1, 'Test-genre' );
INSERT INTO genres(id, genre_text) values ( 2, 'Genre for delete' );
INSERT INTO authors(id, surname, other_names) VALUES ( 1, 'Ivanov', 'Ivan Ivanovich' );
INSERT INTO authors(id, surname, other_names) VALUES ( 2, 'Smith', 'John' );
INSERT INTO authors(id... | true |
a17aa920600825eae0beb251cfaab20e4cf22f62 | SQL | yue18679307314/TCL | /TCLmater/src/main/resources/db/alter_table_1.4.sql | UTF-8 | 2,034 | 3.484375 | 3 | [] | no_license | ALTER TABLE tpm_user_statement ADD COLUMN statement_check_time VARCHAR (20) COMMENT '活动负责人结算审核时间';
CREATE TABLE tpm_branch_admin (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`person_code` varchar(15) NOT NULL COMMENT '员工工号',
`roleType` varchar(90) NOT NULL COMMENT '0分公司管理员',
`org_code` varchar(90) DEFA... | true |
88c315245f85f40229283f8edbde420a4cbbc6be | SQL | ZhackerZ/Capstone-Timesules | /install/old_db.sql | UTF-8 | 10,514 | 2.703125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.5.40, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: timesules
-- ------------------------------------------------------
-- Server version 5.5.40-0ubuntu0.12.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@... | true |
493548fdd2aeeb556acf7050352f80b6576d8da1 | SQL | karmjeetbanwala/RAV_POC_SERVICE | /database/ravdb.sql | UTF-8 | 31,129 | 2.890625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 20, 2016 at 06:49 AM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
cd547d7dc84c3ed00abbaca05d4e8f70efc75137 | SQL | CISC3140-Assignments/Assignment4_SQL | /Tutorial_3.sql | UTF-8 | 2,039 | 4.15625 | 4 | [] | no_license | "This query returns the year, winner, and subject of all noble prizes in 1950"
SELECT yr, subject, winner FROM nobel
WHERE yr = 1950
"This query returns the winner of the literature nobel in 1962"
SELECT winner FROM nobel
WHERE yr = 1962
AND subject = 'Literature'
"This query returns the year when Albert Einstein... | true |
eb2d74493996e16b15345154c4ad12f4afa29b3a | SQL | catinwarmhands/NeoflexStudentPractice2019 | /SQL/lab_07_03_soln.sql | UTF-8 | 1,448 | 3.734375 | 4 | [] | no_license | SET SERVEROUTPUT ON
DECLARE
CURSOR c_dept_cursor IS
SELECT department_id,department_name
FROM departments
WHERE department_id < 100
ORDER BY department_id;
CURSOR c_emp_cursor(v_deptno NUMBER) IS
SELECT last_name, job_id, hire_date, salary
FROM employees
W... | true |
d9871cce56d2bcd7f1266411a2c104b571bfdd59 | SQL | ytyaru/Python.OTP.tools.201704200841 | /database/src/license/create/Check.sql | UTF-8 | 892 | 3.640625 | 4 | [
"BSD-3-Clause",
"CC0-1.0",
"MIT",
"Unlicense",
"Apache-2.0"
] | permissive | .headers on
.tables
select * from sqlite_master where type='table';
select * from Licenses;
select * from Gnu;
select Licenses.Id,Licenses.Name,Gnu.GnuLicenseId from Licenses inner join Gnu on Licenses.Id=Gnu.LicenseId;
.database
ATTACH "GNU.Licenses.sqlite3" AS GNU;
.database
select main.Licenses.Id,main.Licenses.Key... | true |
57bca4e7122d516272e922c1a000b664b40efe57 | SQL | OlafMd/MedCon1.0 | /mm-libs/dbaccess/Level 2/CL2_FiscalYear/Atomic/Retrieval/SQL/cls_Get_FiscalYear_for_Date.sql | UTF-8 | 420 | 3.1875 | 3 | [] | no_license |
SELECT
acc_fiscalyears.ACC_FiscalYearID,
acc_fiscalyears.FiscalYearName,
acc_fiscalyears.StartDate,
acc_fiscalyears.EndDate
FROM
acc_fiscalyears
WHERE
acc_fiscalyears.IsDeleted = 0
AND acc_fiscalyears.Tenant_RefID = @TenantID
... | true |
86446b68c0c3a268024eb5ee7e82d3cf24038103 | SQL | morgan-lloyd/cs3200-lloyd-a2 | /delete.sql | UTF-8 | 280 | 3.046875 | 3 | [] | no_license | DELETE FROM addresses WHERE person_id = 1 AND addresses.primary = 1;
DELETE FROM widgets WHERE widgets.order = 3;
DELETE FROM pages WHERE pages.website_id = 21 AND (SELECT MAX(pages.page_updated) FROM (SELECT * FROM pages) AS pg);
DELETE FROM websites WHERE websites.name = "CNET" | true |
65e227a283bed36b9dc0619546b7ddd3413ee5a9 | SQL | CassioRubens-CR/projects-developed-in-trybe | /Projects_Back_End/sd-06-mysql-all-for-one/desafio17.sql | UTF-8 | 269 | 2.921875 | 3 | [] | no_license | -- 17. Mostre os registros das colunas id e supplier_id das purchase_orders
-- em que os supplier_id sejam tanto 1, ou 3, ou 5, ou 7.
SELECT id, supplier_id FROM northwind.purchase_orders
WHERE supplier_id = 1 OR supplier_id = 3 OR supplier_id = 5 OR supplier_id = 7;
| true |
649bd0f9b5938f436cd0d5020b1b6d6f120a5e4a | SQL | koleksiuk/apbd-cw3 | /cw3/db.sql | UTF-8 | 2,626 | 3.421875 | 3 | [] | no_license |
-- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2020-03-22 07:12:20.376
-- tables
-- Table: Enrollment
CREATE TABLE Enrollment (
IdEnrollment int NOT NULL,
Semester int NOT NULL,
IdStudy int NOT NULL,
StartDate date NOT NULL,
CONSTRAINT Enrollment_pk PRIMARY KEY (Id... | true |
f0ce1122d641cd7a235cd79cabd58e1d95541d2c | SQL | Lucas-Rossetto/EvaluationSQL | /6-query-4.sql | UTF-8 | 257 | 3.03125 | 3 | [] | no_license | select AVG(grade) AS moyenne,
Case a
when grade (between 15 and 20) THEN 'A'
when grade (between 10 and 14) THEN 'B'
when grade (between 5 and 9) THEN 'C'
when grade (between 0 and 4) THEN 'D'
order by grade desc , lastname asc; | true |
0954108eeadb9c37783c2a460d9dca0d36e8863c | SQL | DDecoene/OffiPOS-Stable | /utils/Backup.sql | UTF-8 | 485,242 | 2.953125 | 3 | [] | no_license | DROP TABLE IF EXISTS product_group;
CREATE TABLE [product_group] (
[id] INTEGER NULL PRIMARY KEY,
[name] TEXT NULL
);
INSERT INTO "product_group" VALUES(1,'Frieten');
INSERT INTO "product_group" VALUES(2,'Koude Sauzen');
INSERT INTO "product_group" VALUES(3,'Warme Sauzen');
INSERT INTO "product_group" VALUES(... | true |
c95bd25c79156419c8e79795b28c948117aa281e | SQL | vondacho/myoffice-invoicing | /myoffice-invoicing-application/src/main/resources/db/migration/V3__ddl_create_aggregate_revision_tables.sql | UTF-8 | 2,100 | 2.984375 | 3 | [] | no_license | create table t_folder_aud (
pk_id bigint not null,
rev integer not null,
revtype tinyint,
asked_amount int,
debt_amount int,
id varchar(255),
payed_amount int,
provisioned_amount int,
primary key (pk_id, rev)
);
create table t_folder_affiliate_aud (
rev integer not null,
fk_folder bigint not null,
customer_id varchar(... | true |
e31eed02c7411476db363bf1b8f789414edd6b2c | SQL | keertisharma26/copsbot | /project.sql | UTF-8 | 3,047 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 18, 2021 at 09:30 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
bedb3cbc797a5cb4b297c455d5a3a9dc1ca6783e | SQL | DAEGU-Smart-City-Research/SmartCity | /SmartSQLScripts/db_operational.sql | UTF-8 | 9,190 | 3.921875 | 4 | [] | no_license |
----------------------------------------------------------------------
-- Create the Schemas for the Operational DB
----------------------------------------------------------------------
create schema landing;
create schema ip;
create schema twitter;
-------------------------------------------------------------------... | true |
ab4640c7a304f20dcdaa5cbc5f493265488c6fd9 | SQL | OHDSI/WebAPI | /src/main/resources/resources/cohortdefinition/sql/getCohortDefinitionsById.sql | UTF-8 | 358 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | -- Eventually, this will be driven from cohort_definition, but this is to get it going
SELECT
COHORT_DEFINITION_ID,
COHORT_DEFINITION_NAME,
COHORT_DEFINITION_DESCRIPTION,
DEFINITION_TYPE_CONCEPT_ID,
COHORT_DEFINITION_SYNTAX,
SUBJECT_CONCEPT_ID,
COHORT_INITIATION_DATE
FROM
@results_schema.COHORT_DEFINITI... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.