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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c7be3d4b2b2f41cea41d52d6554075dba7470c2e | SQL | Next2YouAgency/n2y-Agency | /admin/apps/0resources/controles/bd/allnet.sql | UTF-8 | 17,930 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 11-Jan-2016 às 15:23
-- Versão do servidor: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
375636bb5d8a207667e511d8c21dffcdc57205c3 | SQL | lauragirdwood/generation | /database/2019-06-18_mysql/lista-exercicios-02.sql | UTF-8 | 1,905 | 4.0625 | 4 | [] | no_license | -- Exercício 1
CREATE DATABASE biblioteca;
-- Exercício 2
SHOW DATABASES;
USE biblioteca;
-- Exercício 3
CREATE TABLE categoria (
id_categoria INTEGER NOT NULL,
categoria VARCHAR(100),
PRIMARY KEY (id_categoria)
);
-- Adicionar atributo a um campo de uma tabela já criada
ALTER TABLE categoria
MODIFY categor... | true |
650493137d2ed4de06889ba0181c806dcfbe6df2 | SQL | lenuga/mini_project_N | /users.sql | UTF-8 | 3,948 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 24, 2020 at 06:00 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
336d6c05d725e65880cc29956638f469d8af27ec | SQL | mjfo1910/Generation | /2º Módulo/MySql/2 Atividade de banco de dados relacional Mysql/Atividade 1.sql | UTF-8 | 3,431 | 3.796875 | 4 | [] | no_license | /*Crie um banco de dados para um serviço de RH de uma empresa,
o nome do banco deverá ter o seguinte nome db_RH2, onde o sistema
trabalhará com as informações dos funcionários desta empresa. */
create database db_rh2;
use db_rh2;
/*Crie uma tabela tb_cargo utilizando a habilidade de abstração e
determine 3 atributos r... | true |
544a13f6efb8a84b1eecb9815589577c9d6b54ee | SQL | 0316ff8/github | /MySQL/m7_DML.sql | UTF-8 | 1,844 | 3.640625 | 4 | [] | no_license | INSERT INTO department(deptno, dname, mgrno)
VALUES (400, 'Research', 1001);
INSERT INTO department
VALUES (500, 'Personal', 1001);
INSERT INTO department(deptno, dname)
VALUES (601, 'IT');
INSERT INTO department
VALUES (602, 'IT', NULL);
INSERT INTO department(deptno, dname, mgrno)
VALUES (600, 'HRD', 1003), ... | true |
05541a1ee8455a9551f4e38cce46ce9d9d50fe3b | SQL | odhiahmad/lkh | /adonis.sql | UTF-8 | 7,497 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 26 Jun 2020 pada 04.35
-- Versi server: 10.3.16-MariaDB
-- Versi PHP: 7.1.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
fd3f4987bc065df0c4a0606c4dea4f89fe96e108 | SQL | dravid/doki-vet | /doki-vet.sql | UTF-8 | 5,741 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 29, 2015 at 03:27 AM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
ced179ee5719720292b1666a6b56dee045519161 | SQL | erickmartinezlopez/ws-CatalogosKio | /src/resources/db/sql/createTables-db.sql | UTF-8 | 1,840 | 2.84375 | 3 | [] | no_license | /*Tabla KIO_CATALOGOPORTAFOLIO*/
DROP TABLE KIO_CATALOGOPORTAFOLIO IF EXISTS;
CREATE TABLE KIO_CATALOGOPORTAFOLIO (
id INTEGER PRIMARY KEY,
nombreProyecto VARCHAR(150),
responsableProyecto VARCHAR(50)
);
/*Tabla KIO_CATALOGOREQUERIMIENTOS*/
DROP TABLE KIO_CATALOGOREQUERIMIENTOS IF EXISTS;
CREA... | true |
15b3e09b866428bec79c040898042ae6c32294e2 | SQL | bryankocol/Peterbecom | /sql/PhotoViews/SQLSelectPhotosIdCount.sql | UTF-8 | 254 | 3.203125 | 3 | [] | no_license | <params>since=None</params>
SELECT
photoid,
COUNT(photoid) AS count
FROM
photoviews
<dtml-unless "since==_.None or since =='None'">
WHERE
time_stamp >= <dtml-sqlvar since type="string">
</dtml-unless>
GROUP BY
photoid
ORDER BY
count DESC
| true |
f3f23391d55554384e77c53e40037be6799e6146 | SQL | Denis-Sotnikov/job4j_design | /person.sql | UTF-8 | 607 | 2.78125 | 3 | [] | no_license | CREATE TABLE person
(
id integer NOT NULL,
name character varying,
company_id integer,
CONSTRAINT person_pkey PRIMARY KEY (id)
);
insert into person(id, name, company_id) values (1, 'Vika', 1);
insert into person(id, name, company_id) values (2, 'Francheska', 2);
insert into person(id, name, company_id... | true |
a29454ed5a795dd0ccd40fbfbf99c7546ec06531 | SQL | JRBarreraM/Lab_BasesDeDatos1_CI3391 | /1 Proyecto/Entrega/bd_team5.sql | UTF-8 | 12,012 | 3.53125 | 4 | [] | no_license | --------------------------------------------------------------------------------
-- Jose Barrera, 15-10123
-- Maria Magallanes, 13-10787
--------------------------------------------------------------------------------
-- Eliminamos la BD si existe
DROP DATABASE IF EXISTS bd_team5;
-- Creamos la BD
CREATE DATABASE bd_... | true |
886afa5ed24725838bff769e8e4986a9e0e120c2 | SQL | limingshang/liangbang | /public/uploads/sqldata/20181109-114509-1.sql | UTF-8 | 2,115 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | -- -----------------------------
-- Think MySQL Data Transfer
--
-- Host : 127.0.0.1
-- Port : 3306
-- Database : ds_cms
--
-- Part : #1
-- Date : 2018-11-09 11:45:09
-- -----------------------------
SET FOREIGN_KEY_CHECKS = 0;
-- -----------------------------
-- Table structure for `ds_admin`
-- --------... | true |
02c9748b2cc693160bcf9ee430fc6d0d3f3cdaeb | SQL | bloomtec/tecnocenter | /documentacion/5- productos.sql | UTF-8 | 22,266 | 3.34375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 08-03-2011 a las 12:20:14
-- Versión del servidor: 5.1.41
-- Versión de PHP: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 S... | true |
2c85507b1cbe72c545eaa97cd5baee0186ef40d5 | SQL | HYDPublic/greyscale | /backend/db_setup/patches/20160317-01-Attachments.sql | UTF-8 | 286 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | ALTER TABLE "AnswerAttachments"
ADD COLUMN "created" timestamp with time zone NOT NULL DEFAULT now(),
ADD COLUMN "owner" integer,
ADD CONSTRAINT "AnswerAttachments_owner_fkey" FOREIGN KEY ("owner")
REFERENCES "Users" (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION | true |
8014fbf2f05ae4fd459f50045c9d7885b2c38ba4 | SQL | SamuraiDotA/FYP-Integrum | /FYP-postgresql/access_type.sql | UTF-8 | 350 | 3.328125 | 3 | [] | no_license | CREATE TABLE `access_type` (
`id` BIGSERIAL NOT NULL,
`account_type` INT NOT NULL,
`account_access_type` VARCHAR(20),
`user_account_id` BIGINT,
PRIMARY KEY (`id`)
);
ALTER TABLE account_type ADD CONSTRAINT access_type_user_account
FOREIGN KEY (user_account_id)
REFERENCES user_account (id)
NOT DEFERRA... | true |
af209f4390b3d2bc1543bf3265369f7b97cd9eba | SQL | logns/IndoramaReportingTool | /database/tables/users.sql | UTF-8 | 1,533 | 3.703125 | 4 | [] | no_license | /**** users table **/
# user.sql
# Use: User registration.
#
# Initialization for testing : tbd
#
# Change History:
# 3/15/17 - ms ADD: make username, realname index
# 31/03/17 - pjd UPDATE: set default notification, enabled = 1
drop table if exists users;
CREATE TABLE users
(
# Surrogate Primary Key
id ... | true |
5975f4e8fafae0d0fb75b71a02f22db241534450 | SQL | gaosaij/Uda-SQL-Exercise | /sql-with2.sql | UTF-8 | 609 | 4.125 | 4 | [] | no_license | --WITH 2
--对于具有最高销售额 (total_amt_usd) 的区域,总共下了多少个订单?
WITH t1 AS(
SELECT r.name region, SUM(total_amt_usd) total_amt
FROM region r
JOIN sales_reps s
ON r.id = s.region_id
JOIN accounts a
ON s.id = a.sales_rep_id
JOIN orders o
ON a.id = o.account_id
GROUP BY 1
ORDER BY 2 DESC
LIMIT 1),
t2 AS(
SELECT r.name region, COUN... | true |
a8c0e9381d400aa0e5804cf6f948bb248d884042 | SQL | Enjelin/TobaHome | /tobahome_db (1).sql | UTF-8 | 20,184 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 12 Jun 2020 pada 22.23
-- Versi server: 10.1.35-MariaDB
-- Versi PHP: 7.2.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
de8ebe570f00d41e43c8e25e741b246e759984a8 | SQL | larsga/whazzup | /dbimpl.sql | UTF-8 | 3,180 | 3.734375 | 4 | [] | no_license |
create table feeds (
id serial primary key,
title varchar(100),
xmlurl varchar(200) not null,
htmlurl varchar(200),
error varchar(100),
time_to_wait int not null,
last_read timestamp,
last_error timestamp,
time_added timestamp not null default now(),
max_posts int,
last_modified varchar(50) -- "l... | true |
f8745facc2173bd67d0453df4ed0f20f1295645f | SQL | Qingyi-lzh/python | /schema/grade_1_table.sql | UTF-8 | 2,135 | 4.1875 | 4 | [] | no_license | DROP TABLE IF EXISTS student;
CREATE TABLE IF NOT EXISTS student (
sn INTEGER, --序号
no VARCHAR(10), --学号
name TEXT, --姓名
gender CHAR(1), --性别(F/M/O)
enrolled DATE, --入学时间
PRIMARY KEY(sn)
);
-- 给sn创建一个自增序号
CREATE SEQUENCE seq_student_sn
START 10000 ... | true |
2f152f1920c471ee5dbd219a75460ca2f62c1725 | SQL | PNNL-Comp-Mass-Spec/DBSchema_PgSQL_DMS | /dms/v_operations_tasks_list_report.sql | UTF-8 | 2,237 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | --
-- Name: v_operations_tasks_list_report; Type: VIEW; Schema: public; Owner: d3l243
--
CREATE VIEW public.v_operations_tasks_list_report AS
SELECT opstask.task_id AS id,
tasktype.task_type_name AS task_type,
opstask.task,
opstask.description,
COALESCE(u.name_with_username, opstask.requester... | true |
cba28e94c4251f61487a4b6c01c676799ced95b0 | SQL | RichDBA/SQLAdmin | /CPI_discoveryScript.sql | UTF-8 | 1,383 | 3.1875 | 3 | [] | no_license |
SELECT TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME,
--COLUMN_DEFAULT,
--IS_NULLABLE,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
CASE
WHEN Column_name LIKE'%Address%' THEN 'CPI'
WHEN Column_name LIKE 'Cert%' THEN 'CPI'
WHEN Column_name LIKE '%email%' THEN 'CPI'
WHEN Column_name LIKE '%Phone%' THEN ... | true |
179ad5abb3cdaa002c5888a9d6698bea3856858e | SQL | JonathanSomer/db_course_project | /queries/q05CORRECT.sql | UTF-8 | 1,160 | 4.4375 | 4 | [] | no_license | ###### query 5 #####
# input: artist name
# output: events where the performer has the same genre as this artist.
# ordered by their popularity (limited for top 50)
SELECT event_name, event_type, popularity, age_res, event_url, event_date,
venue_name, country AS venue_country, city AS venue_city,
GROUP_CONCAT(ar... | true |
6a935bfb6709adf96e79c6bab0dba8731cd6e5ec | SQL | jahnvi01/Shopping_list-app | /shopping.sql | UTF-8 | 1,551 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.4.1deb2ubuntu2.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 25, 2019 at 06:51 PM
-- Server version: 5.7.25-0ubuntu0.16.04.2
-- PHP Version: 7.0.32-0ubuntu0.16.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
81edd84ee71d87b3ef1db6c2d370c7609faa59e1 | SQL | HelperHelper/materiasprimas | /database.sql | UTF-8 | 2,819 | 3.609375 | 4 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS materiasprimas;
USE materiasprimas;
CREATE TABLE users(
id int(255) auto_increment not null,
rol varchar(20),
name varchar(255),
apellido varchar(255),
email varchar(255),
telefono varchar(255),
password varchar(255) not null,
nombre_tienda varchar(255),
created_at datetime,
u... | true |
54b29bb1a7388ea634b151c7d69fcd1b4bc5fdd3 | SQL | mehdi-boujrada/laraval-uni-project | /tpweb.sql | UTF-8 | 7,643 | 2.984375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 26, 2021 at 03:29 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
12b837811802629dee64e992b0432a11c5c76777 | SQL | gytai/Think.Admin | /think.admin.sql | UTF-8 | 40,206 | 2.9375 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : ctolog.com
Source Server Version : 50629
Source Host : ctolog.com:3306
Source Database : think.admin
Target Server Type : MYSQL
Target Server Version : 50629
File Encoding : 65001
Date: 2017-05-16 17:54:40
*/
SET FOREIG... | true |
2400cac39a6d5b5a220722d4eabef5f0fcc47fe1 | SQL | diemonator/pro-p-teamv2 | /pro-p-team/DateBase Design & Code/SQL.sql | UTF-8 | 14,006 | 3.328125 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- 04/28/17 13:18:55
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITION... | true |
56b006375c5a304a1aec95f4c378dac8cb2e4f2c | SQL | jackhongf/pg_father | /pg_static/DOC/数据库/数据库脚本.sql | UTF-8 | 4,272 | 3.5 | 4 | [] | no_license |
DROP TABLE IF EXISTS `CUSTOMER`;
CREATE TABLE `CUSTOMER` (
`CUS_CODE` int NOT NULL AUTO_INCREMENT COMMENT '用户编码',
`CUS_NAME` varchar(50) DEFAULT '' COMMENT '用户名',
`PASSWORD` varchar(20) DEFAULT '' COMMENT '用户密码',
`NICKNAME` varchar(100) DEFAULT '' COMMENT '昵称',
`IDN` varchar(50) DEFAULT '' COMMENT '... | true |
254197f50b67ae2ec1cc1a650dab725fcb5dcfff | SQL | ishu22994/Indian-Railway-Management-System- | /Schema/Schema.sql | UTF-8 | 2,416 | 3.640625 | 4 | [] | no_license | create table coach(
train_no int(5),
coach_no int(3),
type_of varchar(2),
foreign key (type_of) references coach_type(type_of),
primary key (train_no, coach_no)
);
create table coach_type(
type_of varchar(30),
AC bool,
WiFi bool,
meal bool,
capacity int(2),
primary key (type_of)
);
create table route_table(
destinat... | true |
2f7d3effcee8bc8bb1ba9748a20d01ef35ec2277 | SQL | nik3212/challenges | /HackerRank/SQL/Aggregation/Revising Aggregations - The Count Function/Solution.sql | UTF-8 | 151 | 2.875 | 3 | [
"MIT"
] | permissive | /*
Query a count of the number of cities in CITY having a Population larger than 100,000.
*/
select count(NAME) from CITY where POPULATION > 100000; | true |
38f2f796edbbb254f88af08667e3b245821e9423 | SQL | zhangdeman/base-service | /sql/zdm_article_kind.sql | UTF-8 | 1,203 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE `zdm_article_kind` (
`id` bigint(20) NOT NULL DEFAULT 0 COMMENT '主键ID',
`parent_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '父级ID',
`title` VARCHAR (32) NOT NULL DEFAULT '' COMMENT '标题',
`status` tinyint (32) NOT NULL DEFAULT 0 COMMENT '0 - 正常 1 - 删除',
`is_show` TINYINT(1) NOT NULL DEFAUL... | true |
9e3f856d1b1a7ea11d667785ed76f4f598197e4a | SQL | ASIJmEnnuie/evASIon | /database/scripts/insertions.sql | UTF-8 | 3,649 | 2.96875 | 3 | [] | no_license | INSERT INTO compte values (1, 'Bob', 'Leponge', '01/01/2001', 'M', 'bobleponge@carree.fr', 'blpg', false);
INSERT INTO compte values (2, 'Inspecteur', 'Gadget', '02/02/2002', 'M', 'insp.gadget@quivoila.houhou', 'inspG', true);
INSERT INTO compte values (3, 'Dora', 'Lexploratrice', '03/03/2003', 'F', 'd.lexplo@ouallonsn... | true |
af716eca0791bb12525355061552a0df1e5e9a56 | SQL | d4ni3lb/tfinal_info175 | /queries.sql | UTF-8 | 977 | 3.40625 | 3 | [] | no_license | SELECT nombre_l AS Local ,ciudad.nombre_c AS Ciudad ,local.direccion, COUNT(nombre) AS Total_empleado FROM local ,empleado join ciudad on local.fk_id_ciudad = ciudad.id_ciudad and empleado.fk_id_local = local.id_local GROUP BY nombre_l;
/*SELECT COUNT(nombre) AS Total_empleado,local.nombre_l FROM empleado JOIN loca... | true |
359032402740ed841fa16a1cb21d25c213f3b404 | SQL | aohibbard/algorithms | /src/leetcode.sql | UTF-8 | 145 | 2.984375 | 3 | [] | no_license | -- leetcode sql qs
-- 627 swap salary
UPDATE salary SET sex = case WHEN sex = 'm' then 'f' when sex = 'f' then 'm' end WHERE sex in ('m', 'f');
| true |
6375a412619aea6bd5379d1dddefcb8817d2cf46 | SQL | jjung219/BootcampX | /4_queries/4_average_assistance_time.sql | UTF-8 | 199 | 2.546875 | 3 | [] | no_license | -- single row for average_assistance_request_duration
-- average time of an assistance request
SELECT avg(completed_at - started_at) as average_assistance_request_duration
FROM assistance_requests;
| true |
5b84573ce394fa32d82750624f58ceb5f5917498 | SQL | lilyren8/Notes | /advanced.sql | UTF-8 | 23,974 | 4.15625 | 4 | [] | no_license | -- trafic conv rates
SELECT COUNT(w.website_session_id) AS sessions, COUNT(o.order_id) AS orders, COUNT(o.order_id)/COUNT(w.website_session_id) AS session_to_order_conv_rate
FROM website_sessions AS w
LEFT JOIN orders AS o
ON w.website_session_id = o.website_session_id
WHERE w.created_at < '2012-04-14' AND utm_source =... | true |
6c383060da87b25797fd5234cc495f49f28c6a4c | SQL | Keepgoingon/IS490-Introduction-to-Databases | /Capstone/capstone.sql | UTF-8 | 10,154 | 3.375 | 3 | [] | no_license | CREATE TABLE A8_STUDENT_ORG
(Stu_org_ID NUMBER(9) NOT NULL,
Stu_org_Name VARCHAR2(40) NOT NULL,
PRIMARY KEY (Stu_org_ID));
CREATE TABLE A8_STUDENT_ORG_DES
(Stu_org_Name VARCHAR2(40) NOT NULL,
Stu_org_des VARCHAR2(200),
PRIMARY KEY (Stu_org_Name));
CREATE TABLE A8_DEPARTMENT
(D_ID NUMBER(9) NOT NULL,
D_Name VARCHAR2(4... | true |
39a857b4f9314718af3f289885a644d618cb109b | SQL | Jonathanbustos15/SISEP | /db/update_03032017.sql | UTF-8 | 3,456 | 3.46875 | 3 | [] | no_license |
#modificaciones tabla proyecto_marco
ALTER TABLE `proyecto_marco` DROP `lugar_ejecucion`;
#se añade campo fkID_departamento a proyecto_marco
ALTER TABLE `proyecto_marco` ADD `fkID_departamento` INT NOT NULL AFTER `gerente`;
#creacion de tabla de muchos municipios
CREATE TABLE `proyectoM_municipio` (
`pkID` INT NOT... | true |
a7ad48dfb0b8bbe45d9626c37fde93eaac01921e | SQL | bradym80/MenuMine_Java | /src/sql/make_menumine2_serverside.sql | UTF-8 | 2,629 | 3.03125 | 3 | [] | no_license | --Runs preparation script 2 on prep databases
alter table `menumine_databaseprep`.`tblmasterfood` engine = myisam;
create index mf_chainid on `menumine_databaseprep`.`tblmasterfood` (ChainID);
create index chain_chainid on `menumine_databaseprep`.`tblchain` (`1`);
create index mf_daypartcategory on `menumine_databasepr... | true |
ae14ec0dd94787ae2e1e9b84130051ad62e49e1f | SQL | orinocoz/gaspar | /gaspar/scheme.sql | UTF-8 | 1,119 | 3.234375 | 3 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "torrents" (
"id" TEXT NOT NULL,
"info_hash" TEXT NOT NULL,
"forum_id" TEXT NOT NULL,
"poster_id" TEXT,
"size" INT NOT NULL,
"reg_time" INT NOT NULL,
"tor_status" TEXT,
"seeders" TEXT,
"topic_title" TEXT,
"seeder_last_seen" TEXT,
PRIMARY KEY("id")
);
CREATE TABLE... | true |
68106e8d541cfeb520bccdadead1362d321ec353 | SQL | agusnotti/Curso-programacion-web-full-stack---2019 | /modulo5-BASE_DE_DATOS/6. SUBCONSULTAS/EJERCICIO-SUBCONSULTA.sql | UTF-8 | 1,394 | 3.5 | 4 | [] | no_license | use bd111mil;
-- REPASO
-- set @cliente = (select max(nro_cliente)+ 1 from e01_cliente);
SELECT COUNT(*) from e01_detalle_factura;
INSERT INTO e01_cliente (nro_cliente, nombre, apellido, direccion, activo)
VALUES (101, 'agustina','notti', 'Yrigoyen 943', 28 );
SELECT * from e01_cliente
where nro_cliente = 101;
... | true |
a0f390329fc595096acfc6fe7ebf198d54835455 | SQL | 1538402109/storage_platform | /sql/t_goods_si.sql | UTF-8 | 1,291 | 2.8125 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80012
Source Host : localhost:3306
Source Schema : jtpsi
Target Server Type : MySQL
Target Server Version : 80012
File Encoding : 65001
Date: 16/05/2021 20:5... | true |
69c043b8bdcba5a92769c188bd98c7199343b0ba | SQL | angel37321956/venttp | /src/main/java/document/sql/20180330/用户信息表.sql | UTF-8 | 6,761 | 2.96875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : MySql57
Source Server Type : MySQL
Source Server Version : 50720
Source Host : localhost:3306
Source Schema : venttp
Target Server Type : MySQL
Target Server Version : 50720
File Encoding : 65001
Date: 30/03/2018 17:56... | true |
3184435349648c3715cf5dbc4d9032d8997a8501 | SQL | alinabilaya/hibernate-practice | /src/main/resources/h2_shema.sql | UTF-8 | 2,992 | 3.640625 | 4 | [] | no_license | CREATE TABLE Artist (
id int AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
country VARCHAR(255) NOT NULL,
version INTEGER DEFAULT 0,
PRIMARY KEY (id)
);
CREATE TABLE Painting (
id int AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
summary VARCHAR(255),
dateM... | true |
5a8c93f7bb1669ae5e3cc04639db4501aa041250 | SQL | crackingcoder/directi_pref_app | /src/main/resources/db/01_create_table.sql | UTF-8 | 442 | 3.3125 | 3 | [] | no_license | CREATE TABLE preferences (
id BIGSERIAL,
app_id VARCHAR(100) NOT NULL,
user_id VARCHAR(50) NOT NULL,
key VARCHAR(200) NOT NULL,
value VARCHAR(1024),
created_date TIMESTAMP NOT NULL,
last_updated_date TIMESTAMP NOT NULL,
CONST... | true |
659192c6ea856fdb3f75117f81f07da4da49c6d0 | SQL | RenLiZhou/usb_encryption | /usb_360drm_com.sql | UTF-8 | 41,739 | 3.3125 | 3 | [
"MIT"
] | permissive | /*
Navicat Premium Data Transfer
Source Server : 47.244.2.19
Source Server Type : MySQL
Source Server Version : 50562
Source Host : 47.244.2.19:3306
Source Schema : usb_360drm_com
Target Server Type : MySQL
Target Server Version : 50562
File Encoding : 65001
Date: 12... | true |
99c7124baa58219a27db3e7cfa62081e19ee6284 | SQL | ronni7/GoChatMe | /db/db/gochatme.sql | UTF-8 | 2,068 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 31 Sie 2019, 15:41
-- Wersja serwera: 10.1.37-MariaDB
-- Wersja PHP: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
5c4daf0abbe5bce1ca326e8626126cc6db1bc82a | SQL | EdwinGonzalez23/database_vending_machine_comp | /PSQL/TablesWithConstraints/phase4tables.sql | UTF-8 | 6,150 | 3.984375 | 4 | [] | no_license |
CREATE TABLE Employee (
EmployeeID serial PRIMARY KEY NOT NULL,
FName text NOT NULL,
LName text NOT NULL,
Phone text,
Position text NOT NULL,
Salary money,
SDate date NOT NULL,
StreetName text NOT NULL,
City text NOT NULL,
State text,
Zip integer,
LNum integer UNIQUE,
... | true |
3e6782f4b7e9afdd85d4d2c394b7ebf10fe48325 | SQL | Alltagsheld/Code_fragments | /Datenbanken/P1/crebas.sql | UTF-8 | 5,062 | 3.34375 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: PostgreSQL 9.x */
/* Created on: 27.11.2020 10:59:22 */
/*==============================================================*/
drop index FLIEGT_FK;
drop index HAT_FK;
drop in... | true |
f7936b3bbb978af930dcccc211aec6ff528c2a8d | SQL | ltfschoen/friendfactory | /db/structure.sql | UTF-8 | 47,226 | 3.046875 | 3 | [] | no_license | --
-- 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;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_cat... | true |
0b9e8ce0588b5da78136c640670bbc9b5bcef3a4 | SQL | olgarozhdestvina/Applied-Databases | /PostgreSQL-Queries/Subquery/orders_from_customers_from_states.sql | UTF-8 | 224 | 4 | 4 | [
"MIT"
] | permissive | SELECT concat(firstname, ' ', lastname) "fullname", orderid
FROM orders o,
(SELECT customerid, state, firstname, lastname
FROM customers) c
WHERE o.customerid = c.customerid AND
state IN ('OH', 'NY', 'OR')
ORDER BY orderid; | true |
3e6787fc9309966bda1841a3d45261cb5300e930 | SQL | jonghyunlee1993/DailyAlgorithms | /SQL/DATEDIFF.sql | UTF-8 | 196 | 3.6875 | 4 | [] | no_license | # 오랜 기간 보호한 동물(2)
SELECT D.ANIMAL_ID, D.NAME
FROM ANIMAL_INS AS P
INNER JOIN ANIMAL_OUTS AS D
ON P.ANIMAL_ID = D.ANIMAL_ID
ORDER BY DATEDIFF(D.DATETIME, P.DATETIME) DESC
LIMIT 2 | true |
86ce7b51c8cd37ce36c9320eafb2d76e7fd57933 | SQL | threefinbdd/CS3700 | /bdd_CS3700.sql | UTF-8 | 10,543 | 3.546875 | 4 | [] | no_license | -- Brandon Dave, Samantha Stetz
-- CS3700: Final Project
-- The entered data is fictional.
-- Drop Commands
DROP TABLE SHIPMENT;
DROP TABLE INVOICE;
DROP TABLE PAYMENT;
DROP TABLE DOG;
DROP TABLE DOGFOOD;
DROP TABLE SUPPLIER;
DROP TABLE CUSTOMER;
DROP MATERIALIZED VIEW VWCUSTOMERDOGFAVORITEFOOD;
DROP MATERIALIZED V... | true |
cea8f3e362987e9f0dd266fec5e901e8ff765b8b | SQL | laurenzfiala/urban-trees-db | /source/schemas/tree_data/create/phenology_observation.sql | UTF-8 | 912 | 3.640625 | 4 | [] | no_license | /**
* One entry in this tables, means one oberservation of
* (tree) element "observation_object_id" with result "observation_result_id".
*
* It is only allowed to enter one unique observation object per phenology_observation.
*
* See tables for more info:
* tree_data.phenology_observation_object and tree_data.... | true |
7619839f1eef608c67fd48dcb4cd1fa8377d83ae | SQL | AlexandrKaleganov/akaleganov_junior | /sql/src/main/java/ru/job4j/quterjoin/carInfo.sql | UTF-8 | 1,300 | 3.328125 | 3 | [
"Apache-2.0"
] | permissive | select * from carbody;
--insert into transmission(name) values ('forSedan'), ('forJeep'),('forMicroautobus'),('forSpectehnika');
--insert into carbody(name) values('sedan'), ('jeep'), ('microautobus'), ('spectehnika');
--insert into engine(name) values('vitek'), ('RN10'), ('QG18'), ('DizelDvigatel'), ('QG15');
--ins... | true |
51126b0997fb9cd82f9a6b56fe244a05bac80c2e | SQL | Inwerejosic/basecampAssignments | /Bonus_Task_1.sql | UTF-8 | 1,437 | 4.625 | 5 | [] | no_license | /* Section A of the Solution */
SELECT TenantName /* This is telling the program what I need to find*/
FROM Tenants /* This is telling the program where it should look for the thing I need*/
INNER JOIN( /* This is block telling the program how to link all the various tables to make a logical con... | true |
73842db6dd621da0936f8707c3065da2527e8cda | SQL | jamariod/JobFinder | /sql/schema.sql | UTF-8 | 1,361 | 3.453125 | 3 | [] | no_license | CREATE DATABASE job;
\c job
CREATE TABLE jobs (
id serial PRIMARY KEY,
title text,
job_description varchar(300),
company text,
date_posted date,
compensation varchar(30)
);
-- data obtained through registration (req)
CREATE TABLE bookmarks (
id serial PRIMARY KEY,
bookmarked boolean
)... | true |
1f5af79c1b8b83f1fcd2a98908287a83de28845c | SQL | jumandas/ProjectGladiator | /Db_scripts/BusInsert.sql | UTF-8 | 622 | 2.515625 | 3 | [] | no_license | --1 driver bus, 0 driver less
--time written in 24hr format
insert into tblBus values('MH 05 XY 1500', 60, 'Mumbai', 'Goa', 'Panvel', '05:00:00' ,'13:00:00', 400, 1, 'Orange Bus Express');
insert into tblBus values('MH 05 GX 1423', 60, 'Mumbai', 'Rajkot', 'Vasai', '06:00:00' ,'20:00:00', 600, 1, 'Eagle Express'),
('M... | true |
c5106dcbe4cce50931d8a76c9be55beaba897544 | SQL | ikuromori/08 | /b_table (1).sql | UTF-8 | 3,517 | 2.515625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- ホスト: mysql1036.db.sakura.ne.jp
-- 生成日時: 2021 年 7 月 10 日 08:32
-- サーバのバージョン: 5.7.32-log
-- PHP のバージョン: 7.1.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTE... | true |
f0026191e9652eca8b5f324f370cd66c0dc77e95 | SQL | eniqen/ISFMO | /dbCreator.sql | UTF-8 | 6,514 | 3.578125 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0;
SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0;
SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = 'TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Sche... | true |
66fe21c6ac035352172abda91c408c9e3e7c7cb9 | SQL | williamchand/my-wallet | /wallet.sql | UTF-8 | 2,826 | 3.359375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Waktu pembuatan: 01 Des 2019 pada 14.37
-- Versi server: 8.0.13-4
-- Versi PHP: 7.2.24-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... | true |
089f097cb08890942701df60a2c5fc6aed3aa7c5 | SQL | DhrumilShah26/Group-Formation-Tool | /SQL/spRemoveQuestionsFromSurvey.sql | UTF-8 | 237 | 2.84375 | 3 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS spRemoveQuestionsFromSurvey $$
CREATE PROCEDURE spRemoveQuestionsFromSurvey (
IN surveyID BIGINT
)
BEGIN
DELETE from SurveyQuestions WHERE SurveyQuestions.surveyID = surveyID;
END $$
DELIMITER ; | true |
05f863260bf6fa0edddbd5d6b6ba9c92d6b486fb | SQL | rpt23-sdc-noir/soundcloud-images | /database/schema.sql | UTF-8 | 1,496 | 3.78125 | 4 | [] | no_license | DROP DATABASE IF EXISTS bands;
CREATE DATABASE bands;
\c bands;
CREATE TEMPORARY TABLE band_data (
id SERIAL PRIMARY KEY,
band_id INT,
song_id INT,
song_name VARCHAR(80),
band_name VARCHAR(50),
followers INT,
tracks INT,
band_image_url VARCHAR(120)
);
COPY band_data (band_id, song_id, song_name, ban... | true |
ef743741c7d60b042948c0651ad9d5862f692890 | SQL | tejaalle/Key_Performance_Indicator | /extras/SQLFILES2/school_grad_rel.sql | UTF-8 | 15,961 | 2.796875 | 3 | [] | no_license | CREATE TABLE school_grad_rel(
Year VARCHAR(7)
,SCHLNAME VARCHAR(54)
,FOREIGN KEY(Year) REFERENCES graduation_rates(Year)
,FOREIGN KEY(SCHLNAME) REFERENCES schools(SCHLNAME)
);
INSERT INTO school_grad_rel(Year,SCHLNAME) VALUES
('2015-16','CUMBERLAND NORTH ACADEMY')
,('2014-15','NORTHPORT CONSOLIDATED ELEMENT... | true |
66139ff9d150172aa3bf4d8eb92eacb7e280bc1a | SQL | suslav/SchoolReporting | /schoolreporting.sql | UTF-8 | 6,480 | 3.25 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `schoolreporting` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `schoolreporting`;
-- MySQL dump 10.13 Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost Database: schoolreporting
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.13-MariaDB
/... | true |
de32e7a1f3d3bb943c9f71349e06e622d9822ab3 | SQL | Kyouru/Relacion-socios-con-operaciones-2019 | /Anexo1.1.sql | UTF-8 | 4,167 | 3.0625 | 3 | [] | no_license | --NOMBRE FICHERO: 20111065013001201900.01
--00:45
SELECT
RUCCOOP||'|'||
TIPODOCUMENTO||'|'||
RPAD(NVL(NUMERODOCUMENTO, ' '), 15, ' ')||'|'||
RPAD(NVL(APELLIDOPATERNO, ' '), 50, ' ')||'|'||
RPAD(NVL(APELLIDOMATERNO, ' '), 50, ' ')||'|'||
RPAD(NVL(NOMBRESOCIO, ' '), 80, ' ')||'|'||
RPAD(NVL(R... | true |
a9a69515ddeb7af5907b89bb4b68167caedba8de | SQL | the-lenin/oracle_test_ex | /test1.sql | WINDOWS-1251 | 1,772 | 3.296875 | 3 | [] | no_license | CREATE TABLE account --
(
account_id NUMBER(12) CONSTRAINT account_pk PRIMARY KEY
)
CREATE TABLE service --
(
service_id NUMBER(12) CONSTRAINT service_pk PRIMARY KEY,
serv_name NVARCHAR2(50) NOT NULL
)
CREATE TABLE period
(
period_id NUMBER(12) CONSTRAINT period_pk PRIMARY KEY,
fin_period DATE ... | true |
dfb1275d3823e6adc378f9181c24a9c127531368 | SQL | SM2G/oracle-scripts | /rep_locks.sql | UTF-8 | 3,011 | 3.78125 | 4 | [] | no_license | -- Rem -- --------------------------------------------------
-- Rem -- Platform: Oracle DB
-- Rem -- Desctiption: Shows informations about database locks.
-- Rem -- Usage: @rep_locks
-- Rem -- --------------------------------------------------
Set autot off
Set verify off
Set linesize 180
Set echo ... | true |
63860916979648141715cf61bf3898a34d8c3b71 | SQL | dykoffi/winHealthApi | /databases/apps/gap.sql | UTF-8 | 6,784 | 3.453125 | 3 | [] | no_license | DROP SCHEMA gap CASCADE;
CREATE SCHEMA gap;
CREATE TABLE gap.DossierAdministratif (
-- dossier
idDossier SERIAL PRIMARY KEY,
-- patient
ippPatient VARCHAR(200) UNIQUE DEFAULT get_ipp(),
nomPatient VARCHAR(100),
prenomsPatient VARCHAR(200),
civilitePatient VARCHAR(200),
sexePatient VARCHA... | true |
71600c8fa15eeae8375436d382b1d828193c4f43 | SQL | ClickHouse/ClickHouse | /tests/queries/0_stateless/00688_low_cardinality_dictionary_deserialization.sql | UTF-8 | 490 | 3.03125 | 3 | [
"BSL-1.0",
"Apache-2.0"
] | permissive | drop table if exists lc_dict_reading;
create table lc_dict_reading (val UInt64, str StringWithDictionary, pat String) engine = MergeTree order by val SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi';
insert into lc_dict_reading select number, if(number < 8192 * 4, number % 100, number) as s, s from s... | true |
da9e6e289c7223d200da462b24849ea89d7e7a9d | SQL | melochin/scratch | /server/src/main/resources/create_sql.sql | UTF-8 | 15,417 | 3.1875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: words
-- ------------------------------------------------------
-- Server version 5.7.22-0ubuntu0.17.10.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_... | true |
a16a7fefbfd6d87e02828a4b23afb39357ff974b | SQL | gladiopeace/digital-data-syn | /documents/oms/TB_RECAL.sql | GB18030 | 2,885 | 3.09375 | 3 | [] | no_license | /*
================================================================================
ṹ:TB_RECAL
ṹ:տ̯ϸ
ṹĿ:
================================================================================
*/ ... | true |
6003b82bb382b65a66092b530ce24c66a1ffb159 | SQL | BenHacker1995/DS-Weapon-Damage-Calculator | /database.sql | UTF-8 | 23,766 | 3.53125 | 4 | [] | no_license | CREATE TABLE person (
id SERIAL PRIMARY KEY,
username VARCHAR(20) NOT NULL UNIQUE,
password VARCHAR NOT NULL
);
CREATE TABLE charlist (
id SERIAL PRIMARY KEY,
username VARCHAR(20) NOT NULL,
charname VARCHAR(20) NOT NULL,
strength int,
dexterity int,
intelligence int,
faith int
);
CREATE TABLE category (
id SERIAL PR... | true |
e7bcc03b374ecb8ccdbc0c347bc39b491c292536 | SQL | jdrmmaster/entraga-de-examen | /Calendario_nexu_php/base datos/calendario.sql | UTF-8 | 3,001 | 3.140625 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Versión del servidor: 10.1.28-MariaDB - mariadb.org binary distribution
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.5.0.5349
-- ------------------------------------------------... | true |
54cdc1cc340853c503b5fb2acc494a49d6a15bc5 | SQL | savadev/leetcode-sql-4 | /sql/customers-who-bought-all-products.sql | UTF-8 | 162 | 3.078125 | 3 | [] | no_license | # Write your MySQL query statement below
select customer_id
from Customer
group by customer_id having count(distinct product_key)=(select count(*) from Product) | true |
e6d4bff1070779454014b07bb238ae21fcdedb52 | SQL | srimanthk/spring-mvc-phone-book | /src/main/resources/schema.sql | UTF-8 | 699 | 3.953125 | 4 | [] | no_license | DROP TABLE ENTRY IF EXISTS;
DROP TABLE PHONE_BOOK IF EXISTS;
CREATE TABLE PHONE_BOOK (
ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1),
NAME VARCHAR(30) NOT NULL,
PRIMARY KEY (ID),
UNIQUE (NAME)
);
CREATE TABLE ENTRY(
ENTRY_ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (... | true |
b8c0b3fc723801fd302138b48a38e9de8437a178 | SQL | JoeFarrera/InterflexV2 | /dml/sgavsalidascandidatemacpuesto.sql | WINDOWS-1250 | 2,167 | 3.546875 | 4 | [] | no_license | create or replace view sgavsalidascandidatemacpuesto as
select m.idmac,
m.multiref,
m.idtipmac,
m.ubipos,
m.posubipos,
m.ubides,
sp.iddoc,
sp.prioridad,
sp.idlin,
ld.cantot,
ld.canpen,
ld.canres,
e.cantot - e.canres candis,
... | true |
30635e30f1e7181fa6b1a069603a56bbf9031efc | SQL | ultramega/flavordex-uwp | /Flavordex/Assets/SQL/views.sql | UTF-8 | 868 | 3.78125 | 4 | [
"MIT"
] | permissive | CREATE VIEW IF NOT EXISTS view_entry AS SELECT
a._id AS _id,
a.uuid AS uuid,
a.cat AS cat_id,
b.uuid AS cat_uuid,
b.name AS cat,
a.title AS title,
a.maker AS maker_id,
c.name AS maker,
c.location AS origin,
a.location AS location,
a.date AS date,
a.price AS price,
a.rating AS rating,
a.notes AS notes,
a.updated AS upd... | true |
e3da75c08bc3ea81c8a724b3dfef06cf3a3f1cd2 | SQL | ideadapt/gh-geo-weather-activity | /data/import-countries-json.sql | UTF-8 | 965 | 3.75 | 4 | [] | no_license | DROP TABLE IF EXISTS n_countries_json CASCADE;
CREATE TABLE n_countries_json(jsonrecord json);
COPY n_countries_json FROM '/tmp/input/countries.json';
create view countries_typed_view as
select
(n_countries_json.jsonrecord ->> 'id')::text AS id,
(n_countries_json.jsonrecord ->> 'mindate')::timestamp AS mindat... | true |
2c6b434764a7e5ef1b36c0cfbedf7a924e2b373e | SQL | geomedia/backup.www | /htdocs/app/Config/Schema/update_20120126.sql | UTF-8 | 1,136 | 2.90625 | 3 | [] | no_license | RENAME TABLE `feed_items_feed_tags` TO `feed_items_tags` ;
ALTER TABLE `feed_items_tags` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
ALTER TABLE `feed_items_tags` ADD `name` VARCHAR( 255 ) NOT NULL ,
ADD `count` INT NOT NULL ,
ADD `relevance` FLOAT NOT NULL ,
ADD `raw_data` TEXT NOT NULL;
ALTER ... | true |
7d544367776f806438b50e19aa0621b69d950086 | SQL | muhammadanaswayanad/questionbank | /DB_DUMB/db.sql | UTF-8 | 8,114 | 3.25 | 3 | [] | no_license | /*
SQLyog Community Edition- MySQL GUI v8.03
MySQL - 5.5.20-log : Database - question_bank
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
... | true |
fe2912595f84b81a0810608c4f09fef98ce37b37 | SQL | Ingridprog/Projeto-Marcenaria | /files/database_structure.sql | UTF-8 | 8,117 | 3.078125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `db_exb` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `db_exb`;
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: db_exb
-- ------------------------------------------------------
-- Server version 5.6.49-log
/*!40101 SET @OL... | true |
3b0239330d46d344e30e4bb848b33bc91247b83c | SQL | StepanovaAnastasiya/simpleCatalogPHP | /catalog.sql | UTF-8 | 2,206 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1
-- Время создания: Окт 05 2020 г., 08:19
-- Версия сервера: 10.4.11-MariaDB
-- Версия PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
d10b92fc915c6ec40fc77e2177722fc42aec286c | SQL | EmiliaPezda/Paczkolab | /paczkolab.sql | UTF-8 | 5,440 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 31, 2017 at 05:46 PM
-- Server version: 5.5.52-0+deb8u1
-- PHP Version: 5.6.29-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
ecf717167643d8686fb0a87905a6b143122be76c | SQL | mobius31/jh-code-samples | /wp_ajax/jquery.be.ajax.sql | UTF-8 | 715 | 3.953125 | 4 | [] | no_license | SELECT p.post_title,
p.post_date,
COUNT (p.post_title),
pm.*
FROM nwp_posts p
INNER JOIN nwp_postmeta pm
ON p.ID = pm.post_id
WHERE p.post_type = 'reviews'
AND p.post_status = 'publish'
AND pm.meta_key = 'rating'
GROUP BY meta_value
SELECT
COUNT(DISTINCT(p.ID)) as `count`,
pm.meta_valu... | true |
d86fe4dd45d2a8de6041ceedfecf646380361c05 | SQL | dssg/tuscany-tourism-public | /dev/SQL Scripts/create_filtered_edges360_hours.sql | UTF-8 | 966 | 3.765625 | 4 | [
"MIT"
] | permissive |
alter table tuscany.edgelist_comune_italy
add weight_filtered_time360 decimal default 0;
create temp table filtered_el as (
WITH addloc AS
(
select
vod.customer_id,
vod.time_stamp,
vod.l1 as pro_com
from tpt.tuscany.customer_loc_times vod
where vod.diff > 360
),
edgelist AS
(
se... | true |
2c1c3ef2cf4debfa46ce6d15412f99de320b484c | SQL | Dawidci/Hurtownie-danych-ETL | /04 -Inserts to sources/testing_inserts.sql | WINDOWS-1250 | 1,628 | 3.140625 | 3 | [] | no_license | --Brakujce wymiary
INSERT INTO development.dbo.poprawka VALUES (10, 10, 10, 'AJ', 131, 313);
INSERT INTO development.dbo.gra VALUES (10, 'New', 'Shooter', 134, 1213);
INSERT INTO development.dbo.wersja_poprawki VALUES (10, 'Revision 10', 331);
--Historyzacja starego rekordu
UPDATE development.dbo.wprowadzenie_dodatku ... | true |
e76cc128da364b2eb0c05a6b8302dad11e2146ab | SQL | Harika444/Aurora-liquibase | /dev_changelog.sql | UTF-8 | 666 | 2.796875 | 3 | [] | no_license | --liquibase formatted sql
--changeset ashwani:01
create table Dev3 (
id int primary key,
name varchar(255)
);
--rollback drop table Dev3;
--changeset ashwani:2
create table Dev1 (
id int primary key,
name varchar(255)
);
--rollback drop table Dev1;
--changeset nvoxland:3
insert into ... | true |
8ff10c0d30f5619578aa6ab01652ac9e3fd359dd | SQL | bibekuchiha/SQL-PROJECTS | /Davies Burger/orders-queries.sql | UTF-8 | 1,491 | 4.1875 | 4 | [] | no_license | --1. Start by getting a feel for the orders table:
SELECT *
FROM orders
LIMIT 10;
--2. How recent is this data?
SELECT DISTINCT order_date
FROM orders
ORDER BY order_date DESC;
--3. write a query that selects only the special_instructions column. Limit the result to 20 rows.
SELECT special_instructions
FROM... | true |
943e4a771963d28270142cbade0963bd2573c98b | SQL | sarah-hellmann/SQL-dlivery-nola-DB | /DBandAnalysis.sql | UTF-8 | 8,460 | 3.515625 | 4 | [] | no_license | -- Sarah Hellmann, Group 13
-- SQL Scripts
-- change to applicable database:
use group13_database;
-- DROP TABLE STATEMENTS:
DROP TABLE customer;
DROP TABLE restaurant;
DROP TABLE items;
DROP TABLE driver;
DROP TABLE delivery;
DROP TABLE orders;
DROP TABLE orderInfo;
-- CREATE TABLE STATEMENTS:
CREATE TABLE customer(
... | true |
4a40f00fe569dfdc4b6d7a8323e2ad8f86f3a51d | SQL | EIDSS/EIDSS7 | /OpenEIDSS/EIDSS.DB/dbo/Stored Procedures/Procs1/spDerivativeForSampleType_SelectDetail.sql | UTF-8 | 573 | 2.84375 | 3 | [
"BSD-2-Clause"
] | permissive |
--##SUMMARY Selects data for DerivativeForSampleType form
--##REMARKS Author: Zurin M.
--##REMARKS Create date: 116.09.2010
--##RETURNS Doesn't use
/*
Example of procedure call:
EXECUTE spDerivativeForSampleType_SelectDetail
*/
CREATE PROCEDURE dbo.spDerivativeForSampleType_SelectDetail
AS
--0 DerivativeForSa... | true |
fd6804c6bd4d6a9dad9c8ad7d54a2736ee2d9675 | SQL | qscripter/dc-parking-violations | /parking_violation.sql | UTF-8 | 1,115 | 3.484375 | 3 | [] | no_license | -- Table: public.parking_violation
-- DROP TABLE public.parking_violation;
CREATE TABLE public.parking_violation
(
id integer NOT NULL DEFAULT nextval('parking_violation_id_seq'::regclass),
x numeric,
y numeric,
day_of_week character varying(255),
holiday integer,
week_of_year integer,
month_of_year int... | true |
bbf3abd340ed47d576fa43ed4f4e7d21a9756cd5 | SQL | dmalex619/rfm-wms | /_Companies/MBK/Get initial empty cells (Excel - TXT - SQL).sql | WINDOWS-1251 | 699 | 3.21875 | 3 | [] | no_license | --
if object_id('__Buffer') is not Null drop table __Buffer;
create table __Buffer (Address varchar(20));
exec master..xp_cmdshell 'bcp WMS.dbo.__Buffer in "E:\SuitableWMS\_SQL\Depots\MBK\EmptyCells.txt" -c -k -C1251 -T';
update __Buffer set Address = left(Address, 2) + '0' + substring(Address, 3, len(Address... | true |
2f29bb8a872aa2c4eb65448d7dab5b5815e2f027 | SQL | lyubch/commit-history | /protected/data/schema.mysql.sql | UTF-8 | 2,619 | 3.984375 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE SCHEMA IF NOT EXISTS `commit_history` DEFAULT CHARACTER SET utf8 ;
USE `commit_history`;
-- ----------------... | true |
36235472249771b08ac7fb6a6e30792257217229 | SQL | budingerbc/MariosMarketplace | /marketplace.sql | UTF-8 | 9,996 | 3 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Oct 28, 2017 at 12:49 AM
-- Server version: 5.6.34-log
-- PHP Version: 7.1.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0ec0a6849340579689a756c5e2bcf32fac3e81cd | SQL | apache/spark | /sql/core/src/test/resources/sql-tests/inputs/typeCoercion/native/inConversion.sql | UTF-8 | 22,810 | 3.1875 | 3 | [
"BSD-3-Clause",
"CC0-1.0",
"CDDL-1.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.0-or-later",
"Python-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",... | permissive | --
-- Licensed to the Apache Software Foundation (ASF) under one or more
-- contributor license agreements. See the NOTICE file distributed with
-- this work for additional information regarding copyright ownership.
-- The ASF licenses this file to You under the Apache License, Version 2.0
-- (the "License")... | true |
e4db77379f4c5ceb52481da9323b424703b8a357 | SQL | giuseppericcio/CallCenterManagementSystem_prototipo | /Database/databanks.sql | UTF-8 | 3,902 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Creato il: Dic 11, 2020 alle 20:37
-- Versione del server: 10.4.16-MariaDB
-- Versione PHP: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
fc44d70c3dc44aaaa39274404b634fde7546fa2a | SQL | raymin/mytime | /db/001_ddl/008_create_comment.sql | UTF-8 | 837 | 3.34375 | 3 | [] | no_license | DROP TABLE IF EXISTS T_COMMENT;
CREATE TABLE T_COMMENT (
ID BIGINT(20) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
POST_ID BIGINT(20) UNSIGNED NOT NULL,
USER_ID BIGINT(20) UNSIGNED NOT NULL,
USER_NAME VARCHAR(100),
USER_EMAIL VARCHAR(200),
USER_URL VARCHAR(200),
... | true |
be2b24775eced49ccf3fc814458738a6c9509764 | SQL | oumou318/worst-winner | /models/cards.sql | UTF-8 | 2,096 | 3 | 3 | [] | no_license | DROP DATABASE IF EXISTS cards;
CREATE DATABASE cards;
\c cards;
CREATE TABLE deck (
ID SERIAL PRIMARY KEY,
questions TEXT
);
INSERT INTO deck (questions)
VALUES ('Congrats on becoming a superhero! You can now _____.'),
('You''re stranded on an island. Your only tool for survival is _____.'),
('You just clog... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.