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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7ea2c5b8e9481d5fbb69c9537b2bbc7825f751d9 | SQL | frsknalexis/e-grocery | /ordersaga/src/main/resources/db/changelog/changeset/init.sql | UTF-8 | 1,033 | 3.4375 | 3 | [] | no_license | CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE audit_log_record (
id uuid NOT NULL,
order_id uuid NOT NULL,
event varchar(255) NOT NULL,
created_at timestamptz NOT NULL,
CONSTRAINT audit_log_record_pk PRIMARY KEY (id)
);
CREATE INDEX audit_log_record_order_id_idx ON audit_log_record (orde... | true |
50f90e12ee3d9b1e93e988b74a6acdf026a9e750 | SQL | gangwarjitu123/sdd | /sdd/src/main/resources/db/migration/create-table-district-v4.sql | UTF-8 | 314 | 3.515625 | 4 | [] | no_license | create table if not exists district
(
district_id int not null
primary key auto_increment,
district_name varchar(255) not null,
district_code int not null,
mdds_code int not null,
state_id int not null,
constraint district_state_state_id_fk
foreign key (state_id) references state (state_id)
); | true |
4ad86b617bec033a6f7516b238902b399656b5e6 | SQL | BIFWIG/eshop | /建表语句/调度中心.sql | UTF-8 | 2,133 | 3.46875 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/2/23 10:11:57 */
/*==============================================================*/
drop table if exists schedule_goods_allocation_sto... | true |
c4d17942a62e49bae22abe96d0a26218335ff033 | SQL | vgoel38/PQET | /inputs/really_final_outputs/original/without_nlj/6f.sql | UTF-8 | 3,976 | 2.609375 | 3 | [] | no_license | QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------... | true |
5225d753e7e2639a1744c6e32a7b13e6191474a7 | SQL | zzhxlyc/kpi | /kpi.sql | UTF-8 | 5,914 | 3.421875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50141
Source Host : localhost:3306
Source Database : kpi
Target Server Type : MYSQL
Target Server Version : 50141
File Encoding : 65001
Date: 2012-08-16 09:52:32
*/
SET FOREIGN_KEY_CHECKS=0;
-- ------... | true |
87d5ba42b8d360eae2501871a58bb21eb981a389 | SQL | JkingShui/hexo-boot | /src/main/resources/db/migration/V12__post.sql | UTF-8 | 324 | 2.796875 | 3 | [
"MIT"
] | permissive | ALTER TABLE `t_post`
ADD COLUMN `cover_type` TINYINT NOT NULL DEFAULT '4' COMMENT '封面布局 1:全封面 2:无封面 3:左侧 4:顶部' AFTER `cover_url`;
UPDATE t_post SET cover_type = 1 WHERE is_top = 1;
ALTER TABLE `t_nav`
ADD COLUMN `read_num` INT NOT NULL DEFAULT '1' COMMENT '浏览数' AFTER `cover`;
| true |
a5af4d36708dc6a453e5f388c2defd51190b84ff | SQL | gxlioper/ecology | /data/Oracle/sql201509010701.sql | GB18030 | 1,159 | 2.546875 | 3 | [] | no_license | delete from HtmlLabelIndex where id=125493
/
delete from HtmlLabelInfo where indexid=125493
/
INSERT INTO HtmlLabelIndex values(125493,'Ѿѡ{0}ݽ')
/
INSERT INTO HtmlLabelInfo VALUES(125493,'Ѿѡ{0}ݽ',7)
/
INSERT INTO HtmlLabelInfo VALUES(125493,'Have checked {0} data modifications',8)
/
INSERT INTO HtmlLabelInfo VAL... | true |
97ae5ffd7987a3d4b46f873d38a123873208b9d0 | SQL | Gas-Station21/Banco-de-Dados | /DER_GAS_STATION.sql | UTF-8 | 5,362 | 3.421875 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 01/05/2021 17:47:21 */
/*==============================================================*/
/*================================================... | true |
f9eea19c3ff81d85925a8fdff05b8c315b3f093b | SQL | mikaele90/Vertaisverkkokauppa | /sql/createDB.sql | UTF-8 | 2,963 | 3.796875 | 4 | [] | no_license | DROP DATABASE IF EXISTS verkkokauppa;
CREATE DATABASE verkkokauppa /*!40100 COLLATE 'utf8_general_ci' */;
USE verkkokauppa;
CREATE TABLE UserDB
(
UserId INT NOT NULL AUTO_INCREMENT,
Credits DOUBLE DEFAULT 0,
FirstName VARCHAR(100),
LastName VARCHAR(100),
Email VARCHAR(100),
TelNum VARCHAR(100)... | true |
6ce15cf896bf303248731d328bf0b8e8733a5407 | SQL | ArthurSIO/DOC-GSB-SP2-AppliRV-DR | /script-GSB-RV.sql | UTF-8 | 3,000 | 3.765625 | 4 | [] | no_license | --obtenir matricule des visiteurs qui occupent ou ont occupé le poste délégué régiional --
SELECT v.vis_matricule, vis_nom, tra_role
FROM Visiteur v
INNER JOIN Travailler t
ON v.vis_matricule=t.vis_matricule
WHERE tra_role = "Délégué";
SELECT vis_matricule, tra_role
FROM Travailler
WHERE tra_role="Délégué";
-- obten... | true |
47ebb6a37ce2361b5f4cae205fca57a3fa5244ce | SQL | alejo9998/sistrans | /docs/requerimientos.sql | UTF-8 | 3,307 | 4.21875 | 4 | [] | no_license | --REQUEREMIENTO 1
SELECT C.SUCURSAL,SUM(D.TOTALPAGADO)AS TOTAL
FROM(
SELECT *
FROM(
SELECT *
FROM A_ESTANTE )A INNER JOIN A_PRODUCTOSUCURSAL B ON A.IDESTANTE=B.ESTANTE) C INNER JOIN A_COMPRA D
ON c.IDPRODUCTOSUCURSAL = d.productosucursal
WHERE FECHA BETWEEN 0 AND 1
GROUP BY C.SUCURSAL;
--requerimiento 3
SELECT SUM(B... | true |
b3e0708ee72186557e51b5f1b5feff0f50bf9768 | SQL | Jonathangp18/Proyecto | /t_BUDGETED_YEAR.sql | UTF-8 | 3,923 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 28-05-2020 a las 02:49:59
-- Versión del servidor: 10.2.31-MariaDB
-- Versión de PHP: 7.2.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";... | true |
9c51e078106d18e90508d6d0344e159e0fe81b4c | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.Concierge_Admin_Company_Add.PRC | UTF-8 | 2,162 | 3.671875 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Concierge_Admin_Company_Add]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Concierge_Admin_Company_Add]
GO
CREATE Procedure dbo.Concierge_Admin_Company_Add
(
@CompanyName nvarchar(255),
@CompanyEmail nvarchar(255),... | true |
a6310f96651f52149aa3318ed6bb676df74f336d | SQL | brilliant-almazov/automagistre | /views/Organization.sql | UTF-8 | 688 | 3.546875 | 4 | [] | no_license | SELECT o.id,
o.tenant_group_id,
o.name AS full_name,
COALESCE(balance.money, 0) AS balance,
o.email,
o.telephone,
o.office_phone,
o.seller,
o.contractor,
o.address,
o.requisite_bank,
o.requisite_bik,
o.requisite_inn,... | true |
43a6e90ea8851d9e311a26973afa016a563bb99d | SQL | geozevallos/SQL-Intro | /06-ConsultasdeAccion.sql | UTF-8 | 1,435 | 3.515625 | 4 | [] | no_license | #CONSULTAS DE ACCION
#ACTUALIZACION
UPDATE practicandobd.productos
SET PRECIO = PRECIO + 10
WHERE SECCIÓN = 'JUGUETERÍA';
UPDATE practicandobd.productos
SET SECCIÓN = 'JUGUETES'
WHERE SECCIÓN = 'JUGUETERÍA';
UPDATE practicandobd.productos
SET SECCIÓN = 'JUGUETERÍA'
WHERE SECCIÓN = 'JUGUETES';
#CREACION DE TABLA
C... | true |
db56e4f5115f138234b0e7e937ccf58cefecf1de | SQL | red37/airdatabase | /airline3.sql | UTF-8 | 1,636 | 2.6875 | 3 | [] | no_license | UPDATE airplane
SET AirlineCompany='Nu Delta Airlines', AirplaneTypeName='Air Hamburg 777'
WHERE AirplaneID='453';
UPDATE airport
SET AName ='Hamburg International Airport', Location='Hamburg'
WHERE AirportId ='4Go6XIuL';
#change flight arrivalid to hnP8JfJK from 4Go6XIuL
UPDATE flight
SET FlightType='domestic', FAir... | true |
133f951944793b6ed789e7f7b5844feba1f4c93e | SQL | ellmkay/apgdiff | /src/test/resources/cz/startnet/utils/pgdiff/multiple_schema_privileges_diff.sql | UTF-8 | 516 | 2.59375 | 3 | [
"MIT"
] | permissive |
SET search_path = schema1, pg_catalog;
REVOKE ALL ON TABLE table1 FROM ellmkay;
GRANT ALL ON TABLE table1 TO ellmkay;
SET search_path = schema2, pg_catalog;
REVOKE ALL ON TABLE table2 FROM postgres;
GRANT UPDATE ON TABLE table2 TO postgres;
SET search_path = schema3, pg_catalog;
REVOKE ALL ON SEQUENCE sequence3 F... | true |
885a8f1b4cd2de8b9c55451f8e4bd0a1f9921133 | SQL | questsin/cheats | /cheatsheets/kafka/ksql.sql | UTF-8 | 1,544 | 3.40625 | 3 | [
"Apache-2.0"
] | permissive | SHOW HISTORY;
SHOW TOPICS;
PRINT "TOPIC;
SHOW PROPERTIES";
CREATE TABLE hourly_metrics AS
SELECT url, COUNT(*)
FROM page_views
WINDOW TUMBLING (SIZE 1 HOUR)
GROUP BY url EMIT CHANGES;
SELECT * FROM hourly_metrics
WHERE url = 'http://myurl.com' AND WINDOWSTART = '2019-11-20T19:00';
SELECT * FROM hourly_... | true |
4c9b1107b034cbdce3cb90246c353d4c76211a29 | SQL | fargelus/databases-learning | /postgres/holiday_view_upd.sql | UTF-8 | 173 | 2.90625 | 3 | [] | no_license | CREATE OR REPLACE VIEW holidays AS
SELECT event_id AS holiday_id, title AS name,
starts AS date, colors
FROM events
WHERE title LIKE '%Day%' AND venue_id IS NULL;
| true |
efc37efccfa0916f3fa8ea3645d31f1a42ad93a9 | SQL | cnukaus/footprint-analytics | /footprint_airflow/dags/token_stats/coin_paprika/token_price_per_minute.sql | UTF-8 | 450 | 3.375 | 3 | [
"MIT"
] | permissive | WITH minutes AS (
SELECT 0 AS nums
UNION ALL
SELECT 1 AS nums
UNION ALL
SELECT 2
UNION ALL
SELECT 3
UNION ALL
SELECT 4
),
coin_price AS (
SELECT
address, minute, price
FROM
`xed-project-237404.footprint_etl.token_stats_coin_price`
GROUP BY address, minute, price
... | true |
65a296de9cfeed8d4923406733841c3b2ed00ebc | SQL | AlexanderKrustev/SoftUni | /CSharp Profession/DB Basics/04. Built-in-Functions/5. FindTownsWithNameLength.sql | UTF-8 | 90 | 2.890625 | 3 | [] | no_license | SELECT t.Name FROM Towns AS t
WHERE LEN(t.Name)=5
OR LEN(t.Name)=6
ORDER BY t.Name | true |
d209c8c7d567ca990bf1962050048fd1ee6be33a | SQL | maron6/SEIDR | /SEIDR.Database/SEIDR/Tables/Schedule.sql | UTF-8 | 429 | 2.953125 | 3 | [
"MIT"
] | permissive | CREATE TABLE [SEIDR].[Schedule] (
[ScheduleID] INT IDENTITY (1, 1) NOT NULL,
[Description] VARCHAR (100) NOT NULL,
[DD] SMALLDATETIME NULL,
[Active] AS (CONVERT([bit],case when [DD] IS NULL then (1) else (0) end)) PERSISTED,
[DateFrom] DATE DEFAULT (g... | true |
04f31608141dc7664609b8f63c9bd1f6115f089a | SQL | ntbutwal/VehicleInsurancePolicyAssignment | /src/main/resources/Sql Query/1.AllEntities.sql | UTF-8 | 1,435 | 3.390625 | 3 | [] | no_license | create database VehicleInsurance;
use VehicleInsurance;
create table Policy(
id bigint not null auto_increment primary key,
Type varchar(50) not null,
Policy_No varchar(50) not null,
Start_Date date not null,
Expiry_date date not null,
Customer_Id bigint,
Is_Active boolean,
foreign key(Customer_Id) references Customer(... | true |
7fc40951fb2bb9eec26e2c2523869582d430378e | SQL | fhir-fuel/fhir-storage-and-analytics-track | /example.cql | UTF-8 | 4,591 | 3.65625 | 4 | [] | no_license | using FHIR version '3.0.0'
/*
Description
The percentage of women 21-64 years of age who were screened for cervical
cancer using either of the following criteria:
* Women 21-64 years of age who had cervical cytology performed every 3 years.
* Women 30-64 years of age who had cervical cytology/human papillomavirus
... | true |
81c6435a1e9d502d822ab835b6d87db13d05e210 | SQL | feloras/BD | /FinalTask/File 3.sql | UTF-8 | 226 | 2.578125 | 3 | [] | no_license | insert INTO employees(first_name,last_name,email,phone_number,hire_date,job_id,salary,commission_pct)
select distinct
FIRST_NAME,
LAST_NAME,
EMAIL is null,
PHONE_NUMBER,
HIRE_DATE,
JOB_ID,
SALARY,
COMMISSION_PCT
from report;
| true |
277d16388eba11b7ee40bdaf1dc3859e0ea1f7c4 | SQL | trungtaba/speedyaccess | /database/access.sql | UTF-8 | 72,785 | 3.203125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: localhost Database: access
-- ------------------------------------------------------
-- Server version 5.6.24-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... | true |
4509c320228f2d19f8d38925747ebc5a9c45ad9b | SQL | balabanovds/go-socials | /internal/data/mysql.sql | UTF-8 | 1,309 | 3.734375 | 4 | [] | no_license | drop table user_users;
drop table sessions;
drop table profiles;
drop table genders;
drop table users;
create table users
(
id serial primary key,
uuid varchar(64) not null unique,
email varchar(255) not null unique,
password varchar(255) not null,
created_at datetime not ... | true |
28a504290aae2308e30e6105fcb7899273334b70 | SQL | teruuuuuu/newscalaping | /conf/evolutions/default/1.sql | UTF-8 | 309 | 2.625 | 3 | [] | no_license | CREATE TABLE "scrape_top" (
"id" SERIAL PRIMARY KEY,
"url" varchar(255) NOT NULL,
"title" varchar(255),
"description" varchar(255),
"create_date" timestamp NOT NULL
);
CREATE TABLE "top_link" (
"id" SERIAL PRIMARY KEY,
"top_id" int NOT NULL,
"url" text NOT NULL,
"text" text NOT NULL,
"add_date" timestamp
); | true |
f78de566eb890944dc0ff54f3991a2f3e4436818 | SQL | waltermir/jif_ang_final | /src/bd/procedures/prd_chofer.sql | UTF-8 | 195 | 2.53125 | 3 | [] | no_license | DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `prd_chofer`(p_documento int(11))
BEGIN
UPDATE chofer
SET baja_fecha = now()
WHERE documento = p_documento;
END$$
DELIMITER ;
| true |
0c5bda49cb7e4c3f8e394a595584a63e76e39051 | SQL | brogly-zz/sqlite-sample-dbs | /adventureworks-dw/adventureworks-dw-schema.sql | UTF-8 | 10,079 | 2.9375 | 3 | [
"MIT"
] | permissive | BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "ProspectiveBuyer" (
"ProspectiveBuyerKey" INTEGER,
"ProspectAlternateKey" INTEGER,
"FirstName" TEXT,
"MiddleName" TEXT,
"LastName" TEXT,
"BirthDate" TEXT,
"MaritalStatus" TEXT,
"Gender" TEXT,
"EmailAddress" TEXT,
"YearlyIncome" INTEGER,
"TotalChildren" INTEGER,
... | true |
02abf35d10e9f60131fdbd1e4529989f4ac00a71 | SQL | rekharokkam/spring-bean-demo | /db/practice_schema_creation.sql | UTF-8 | 1,984 | 3.75 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS `practice`.`RENTAL_LOCATION` (
`RENTAL_LOCATION_ID` INT NOT NULL AUTO_INCREMENT,
`NAME` VARCHAR(100) NULL,
`ADDRESS1` VARCHAR(100) NULL,
`ADDRESS2` VARCHAR(100) NULL,
`CITY` VARCHAR(45) NULL,
`STATE` VARCHAR(45) NULL,
`POSTAL_CODE` VARCHAR(45) NULL,
PRIMARY KEY (`RENTAL_LOCATI... | true |
a4255b22e23607ca5506f5565b5ae25818f234bc | SQL | murilodepa/Programming-Topics | /Aulas/Aula 11 - MySQL/11_database.sql | UTF-8 | 967 | 3.03125 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- substituir pelo nome do seu bd
USE `aula08`;
CREATE TABLE IF NOT EXISTS `cliente` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(200) NOT NULL,
`endereco` text NOT NULL,
`email` varchar(200) NOT NULL,
`telefone` varchar(20) NOT NULL,
PR... | true |
703be435eab3c3762a95ddf1cc21cab3e8095a47 | SQL | lailafithri/Praktik-PWD | /validasi.sql | UTF-8 | 1,676 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 28 Okt 2021 pada 23.08
-- Versi server: 10.3.15-MariaDB
-- Versi PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
4df2c1a282f8646c5e7c85c92a69d9b3458dfcfe | SQL | AnupMiraje/Smart-Restro | /Restaurant/Table.sql | UTF-8 | 3,913 | 3.140625 | 3 | [] | no_license | create table Accounts(
srno int NOT NULL,
start_date date NOT NULL,
start_order_no int NOT NULL,
Total_Amount int NOT NULL,
primary key(srno)
);
create table Accountsd(
srno int NOT NULL,
date date NOT NULL,
start_order int NOT NULL,
Total_Amount int NOT NULL,
primary key(srno)
);
create table att... | true |
7ea97cc305e7e9b7678cceaf272b376a93374eac | SQL | MarilynMp/OnlineNoteMakingAPI | /OnlineNoteMakingApp/DB/Tables/TableCreateScripts.sql | UTF-8 | 912 | 3.78125 | 4 | [] | no_license | ----1) User Details Table
--CREATE table UserDetails(
-- UserId int PRIMARY KEY,
-- UserName varchar(100) NOT NULL,
-- Password varchar(255) NOT NULL
--);
----2) Note
--CREATE table Note(
-- NoteId int PRIMARY KEY,
-- NoteMessage text,
-- IsDeleted boolean NOT NULL DEFAULT 0
--);
----3) NoteUserAssociatio... | true |
4a741ea563aa943e999f6f3aefa2e261ebb10f45 | SQL | nayeong2/boardmvc | /WebContent/doc/query.sql | UHC | 1,108 | 3.75 | 4 | [] | no_license | -- Խ
SELECT b.bcode, b.bname, b.btype, c.ccode, c.cname,
case
when b.btype= 5 then 'reboard'
when b.btype= 6 then 'album'
when b.btype= 7 then 'bbs'
else 'board'
end control
FROM board_list b, category c
WHERE b.ccode= c.ccode
ORDER BY b.bcode asc;
-- ȭ鿡 20
-- pg= 2
-- bcode= 3
-- ... | true |
f22589da7fff3e8051e4c1d1f5adf93a4863aa06 | SQL | Hooseman/kenny-strength | /db/get_user_info.sql | UTF-8 | 151 | 2.90625 | 3 | [] | no_license | select clients.*, client_sessions.user_id
from client_sessions
join clients
on clients.id = client_sessions.user_id
where client_sessions.user_id = $1; | true |
bd06a8c68cfbd5195721600c23d541edac8f68f6 | SQL | zhangleizjk/Nooper.Shop | /_doc/mysql/init_mysql_data.sql | UTF-8 | 14,902 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | /**
* Working in Nooper_Shop
*/
use `nooper_shop`
/**
* Part 1: System
*/
truncate table `system_default_params`;
insert into `system_default_params`(`id`, `money_type`, `exchange_growth_rate`, `exchange_point_rate`, `add_time`) values
(1, 'CNY', 0.10, 1.00, UNIX_TIMESTAMP());
truncate table `syst... | true |
37e779abf9dfd0992e74fd448d23c59f31837ff0 | SQL | yenney/technical_test_checkout | /batch_pipeline/airflow/dags/dbt/target/run/checkout_dbt_models/models/published/all_time_postcode_user_pageviews_by_month.sql | UTF-8 | 577 | 2.671875 | 3 | [] | no_license |
delete
from "checkout"."published_data"."all_time_postcode_user_pageviews_by_month"
where (sk_atpupm) in (
select (sk_atpupm)
from "all_time_postcode_user_pageviews_by_month__dbt_tmp175823831494"
);
insert into "checkout"."published_data"."all_time_postcode_user_pageviews_by_mont... | true |
8e5811ec98e93eb4ad40996ffb02383d6d7305f8 | SQL | CEN4010Group6/geek-text | /backend/prisma/migrations/20210206195221_change_zipcode/migration.sql | UTF-8 | 1,902 | 3.4375 | 3 | [
"MIT"
] | permissive | /*
Warnings:
- The migration will change the primary key for the `credit_cards` table. If it partially fails, the table could be left without primary key constraint.
- You are about to drop the column `cardId` on the `credit_cards` table. All the data in the column will be lost.
- Added the required column `id... | true |
7b355e2bf347b7f6ed06baabbd9a02434238a583 | SQL | mattcbodily/tutorlab | /db/pending_tutor_tutors.sql | UTF-8 | 234 | 3.15625 | 3 | [] | no_license | select t.tutor_id, t.first_name, t.last_name, t.email, t.profile_pic, c.class_id from tutors t
join class c on t.tutor_id = c.tutor
join tutor_class_join tc on c.class_id = tc.class
where tc.accepted = false
and tc.tutor_student = $1; | true |
c28244f2b0bfef29af34a2de1558c57c06c3283d | SQL | bayernmunich/IBM1 | /util/Batch/AddLRSCHEDTablesOracle.ddl | UTF-8 | 2,333 | 3.34375 | 3 | [] | no_license | -- This script adds the necessary job log/class tables to an oracle db due to APAR PM81925.
--
-- 1.Process this script using SQL*Plus
-- 2. Replace all occurrances of @LRSCHED_TABLESPACE@ with a valid tablespace that was
-- created by the CreateLRSCHEDTablespaceOracle.ddl script.
-- Example:
-- o sqlplus userna... | true |
3511dcad56f3f3b32fd38a4de2734ac578970ee9 | SQL | eltonmesquita87/test | /jose-typescript-nodejs-authentication/sql/schedule/claim_center/40 - Bulk Invoice not sent.sql | UTF-8 | 454 | 3.546875 | 4 | [] | no_license | select distinct bi.InvoiceNumber, bis.TYPECODE, bis.L_pt as Status, biis.TYPECODE
from cc_bulkinvoice bi
inner join cctl_bulkinvoicestatus bis
on bis.ID = bi.Status
inner join cc_bulkinvoiceitem bii
on bi.ID = bii.BulkInvoiceID
inner join cctl_bulkinvoiceitemstatus biis
on biis.ID = bii.Status
where bi.Sche... | true |
7ab3cbc429a87d4d3c62e8145722568b1251b520 | SQL | bennyfajri/PHP-ServerLaundry | /laclaundry (2).sql | UTF-8 | 7,004 | 3.15625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 17, 2021 at 01:21 PM
-- Server version: 10.4.18-MariaDB
-- PHP Version: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
947148de81c3e42961fd75f06442b0ca9b254244 | SQL | iechenyb/BackServer1.3 | /table.sql | UTF-8 | 9,547 | 3.203125 | 3 | [] | no_license |
alter table stock drop column industry;
alter table stock drop column classify;
alter table stock add(industry varchar2(5),classify varchar2(5),timeOfMarket long,province varchar2(10));
alter table minutequtoescurrday add(time_min long);
alter table minutequtoescurrday add(volume number,turnvolume number);
a... | true |
22bbb99b9aa6a5d9e0b0c7463416aac35c7e89c6 | SQL | medkg15/how-to-train-your-robot | /database/2014_10_20_schema.sql | UTF-8 | 754 | 3.859375 | 4 | [] | no_license | create table game_session (
id int primary key auto_increment,
start datetime not null,
end datetime null,
session_id varchar(100) not null
);
create table level_attempt(
id int primary key auto_increment,
level_id int not null,
program text not null,
number int,
start datetime not null,
end dateti... | true |
701fce4a3d8b6728b8df7598038c41b4d8ddbb54 | SQL | gustavocosta7/DAD-CidadeRMI | /dadpj2/dad.sql | UTF-8 | 665 | 3.140625 | 3 | [] | no_license | create database dad;
use dad;
create table estado(
estid int not null auto_increment,
estnome varchar(15) not null,
estsigla varchar(5),
estibge int,
primary key(estid)
);
drop table cidade;
create table cidade(
cidid int not null auto_increment,
cidestid int not null,
cidnome varcha... | true |
e81aab79c05218396f5d9579e6333ee2452ea700 | SQL | ryankelly1027/Task1 | /Test.sql | UTF-8 | 1,169 | 3.609375 | 4 | [] | no_license | SELECT DISTINCT
(SELECT
COUNT(lw_message.DIRECTION)
FROM
lw_message
WHERE
lw_message.DIRECTION = 'I') AS I,
(SELECT
COUNT(lw_message.DIRECTION)
FROM
lw_message
WHERE
lw_message.DIRECTION = 'O') AS O
FROM
... | true |
c9b39e456a1aa43bf09e7a87727722116b7408cb | SQL | davendiy/Databases_course4 | /create.sql | UTF-8 | 18,425 | 3.328125 | 3 | [] | no_license | -- Excusa. Quod scripsi, scripsi
-- by David Zashkolnyi
-- 10.11.2020
-- Drop for reuse
-- Create schemas
-- Create tables
CREATE TABLE CASHIERS
(
CASHIER_ID NUMBER(12) NOT NULL,
CASHIER_NAME VARCHAR(256),
CASHIER_TAX NUMBER(16, 2),
CONSTRAINT cashiers_pk PRIMARY KEY(CASHIER_ID)
);
comment on table ... | true |
b3fd23322b8b9645c0e2ec2fc72e88cc7f5aa4e2 | SQL | oopendgame/FinalWebProject | /sql/answers.sql | UTF-8 | 397 | 3.453125 | 3 | [] | no_license | USE finalProject;
DROP TABLE IF EXISTS answers;
-- remove table if it already exists and start from scratch
CREATE TABLE IF NOT EXISTS answers (
answer_id int not null auto_increment,
question_id int not null,
answer varchar(20) not null,
correct_ans boolean not null default 0,
primary key(a... | true |
78dc2baff9f094e8066985400251692340d730ef | SQL | fakecoding20/absensi-karyawan | /absensi_karyawan .sql | UTF-8 | 1,786 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 17, 2017 at 09:42 AM
-- Server version: 5.5.32
-- PHP Version: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
6ab2572d26ba3c625ee81339884a61303a4f649e | SQL | hw79chopin/MySQL-Codebook | /SQL 스터디/중급/079.sql | UTF-8 | 475 | 3.359375 | 3 | [] | no_license | -- 데이터 수정하기 (UPDATE)
-- Q.SCOTT의 월급을 3200으로 수정하시오
UPDATE emp
SET sal = 3200
WHERE ename = "SCOTT";
-- Q.SCOTT의 월급은 3300, comm은 200으로 수정하시오
UPDATE emp
SET sal = 3300, comm = 200
WHERE ename = "SCOTT";
-- Q. SCOTT의 월급을 KING의 월급과 같게 수정하시오
UPDATE emp
SET sal = (SELECT s.sal FROM (SELECT sal FROM emp WH... | true |
5cdc10c0fc08d320620bcf08682d71b9749f9651 | SQL | lskyo/NeueduBuyer | /源码及数据库脚本/Java后台/NeueduBuyer/script/集团信息化管理系统(mysql).sql | UTF-8 | 19,197 | 3.375 | 3 | [] | no_license | # SQL Manager for MySQL 5.4.3.43929
# ---------------------------------------
# Host : localhost
# Port : 3306
# Database : mmsdb
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLL... | true |
e59185d8b16fc12f1b6c4de6fa71964e56ec3215 | SQL | Marcelofoxweb/tesp-1 | /escola1/src/main/resources/import.sql | UTF-8 | 1,209 | 2.5625 | 3 | [] | no_license | insert into Member (id, name, email, phone_number) values (0, 'John Smith', 'john.smith@mailinator.com', '2125551212')
insert into TB_PESSOA (id, cpf, nome) values (1, '111.111.111-11', 'Marcelo')
insert into TB_PESSOA (id, cpf, nome) values (2, '222.222.222-22', 'Pedro')
insert into TB_PESSOA (id, cpf, nome) values ... | true |
d0a13cb905a1720d446f33868241dc804f4df300 | SQL | VicenteHariel/Banco-de-Dados | /ProjetoE-Commerce/DDL_Ecommerce.sql | UTF-8 | 2,288 | 3.703125 | 4 | [] | no_license | CREATE TABLE pessoa_tipo (
id_pessoa_tipo INTEGER PRIMARY KEY UNIQUE,
nome_tipo VARCHAR(100) NOT NULL
);
CREATE TABLE pessoa (
id_pessoa SERIAL PRIMARY KEY UNIQUE,
nome VARCHAR(100) NOT NULL,
cpf VARCHAR(11) NOT NULL,
data_nasc date NOT NULL,
id_pessoa_tipo INTEGER NOT NULL,
FOREIGN KEY (i... | true |
1a1d6ab496aa4691024ee2be1c15d5ef7ddab427 | SQL | aviteller/book-helper | /sql/audits.sql | UTF-8 | 400 | 2.578125 | 3 | [] | no_license | CREATE TABLE public.audits
(
id serial,
user_id integer,
action text,
model text,
model_id integer,
parent_model text,
parent_model_id integer,
created_at time with time zone DEFAULT CURRENT_TIMESTAMP,
updated_at time with time zone DEFAULT CURRENT_TIMESTAMP,
deleted_at time with... | true |
66d8797f93aeef357d8fa7db4d8310ec051c4427 | SQL | jgarzonext/paquetes | /PAC_EMPLEADOS_REPRESENTANTES.sql | WINDOWS-1252 | 4,081 | 2.8125 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Package PAC_EMPLEADOS_REPRESENTANTES
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE PACKAGE "AXIS"."PAC_EMPLEADOS_REPRESENTANTES" IS
/**************************************************************************... | true |
c52424956b23de9b2d4edae74b2a5ccc61e36ada | SQL | PratikBahirat/Training- | /assignment01.sql | UTF-8 | 654 | 3.234375 | 3 | [] | no_license | use Assignment01;
create table membership(membership_id int auto_increment
, Full_Names varchar(20)
, Physical_Address varchar(30)
, Salutation_id int ) ;
insert into membership
values (3,'robert phill', '5th avenue', 1);
select * from membership;
create table movies(membership_id int
, movies_rented varchar (30... | true |
5f258b70f2907b4ac25066afc1fbfd04aa4505d4 | SQL | CS3345-Team-1/Vroom | /vroom.sql | UTF-8 | 4,319 | 3.859375 | 4 | [] | no_license | /*vroom database*/
/*DROP DATABASE IF EXISTS `vroom`;
CREATE DATABASE `vroom`;
USE `vroom`;*/
/******NOTE: we are using cleardb, which auto_increments ids by 10 instead of by 1******/
/*create users table w/ default values*/
drop table if exists `users`;
CREATE TABLE `users` (`userID` int not null auto_increment prim... | true |
d0e212726867429643fa0958d91d8209b088eed5 | SQL | Jhon0103/PHPPrestamos | /CONTROLADOR/Conf/BDPrestamo.sql | UTF-8 | 837 | 3.46875 | 3 | [] | no_license | DROP DATABASE IF EXIST BDPrestamo;
CREATE DATABASE BDPrestamo;
USE BDPrestamo;
CREATE TABLE CLIENTE
(COD_CLI INT AUTO_INCREMENT PRIMARY KEY,
NOM_CLI VARCHAR(50),
APE_CLI VARCHAR (50),
DNI_CLI CHAR(8)
);
INSERT INTO CLIENTE VALUES(NULL,'JHON','SIESQUEN','12345678');
INSERT INTO CLIENTE VALUES(NULL,'FABIAN','UZURIAGA'... | true |
8f82604ac50e7aa90e733bf402ffe4f595899206 | SQL | TonyKartony/BI-Lab-2017 | /_2. ETL/Tasks/Saida_Melikava/task1/task1_1/create_table_3NF.sql | UTF-8 | 1,139 | 3.421875 | 3 | [] | no_license | CREATE TABLE globals
(
global_id NUMBER(10,0) PRIMARY KEY ,
global_desc VARCHAR2 ( 200 CHAR ) NOT NULL
);
CREATE TABLE continents
(
continent_id NUMBER(10,0) PRIMARY KEY ,
continent_desc VARCHAR2 ( 200 CHAR ) NOT NULL,
global_id NUMBER(10,0) NOT NULL,
CONSTRAINT gk_glob FOREIGN KEY (g... | true |
2706d810fa0128bed268b546272d75ea2dc28174 | SQL | megliryan/blog | /query.sql | UTF-8 | 2,308 | 3.890625 | 4 | [] | no_license | -- Create a posts table
CREATE TABLE posts (
post_id int NOT NULL AUTO_INCREMENT,
title varchar(50),
author_name varchar(50),
content varchar(2000),
PRIMARY KEY (post_id)
);
-- Create a comments table
CREATE TABLE comments (
comment_id int NOT NULL AUTO_INCREMENT,
commenter_name varchar... | true |
a77b80a24048fc4948b51af28b003ae662290edf | SQL | zhumingwei8368/sbsFactory | /tbl_product.sql | UTF-8 | 1,624 | 2.953125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : mysql-local
Source Server Version : 50718
Source Host : localhost:3306
Source Database : sbsdb
Target Server Type : MYSQL
Target Server Version : 50718
File Encoding : 65001
Date: 2017-11-14 20:39:12
*/
create database sbsdb;
use sbsdb... | true |
fb6ac232c3e3dea2d4622a50815f3635d51b99f1 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day17/select2053.sql | UTF-8 | 178 | 2.671875 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-16T20:53:00Z' AND timestamp<'2017-11-17T20:53:00Z' AND temperature>=35 AND temperature<=71
| true |
bb5a19ce8142848dd6de47535b9e1f1ca8999fef | SQL | bokhaus/ProgrammingPortfolio | /SQL/SmartHomesQueries.sql | UTF-8 | 3,003 | 3.875 | 4 | [] | no_license | REM QUERY 1. CONCAT firstname and lastnamewith space
SELECT lastname || ' ' || firstname AS query1
FROM customer
ORDER BY lastname;
---------------------------
REM Query 2. List all orders with date ordered output
SELECT orderid, TO_CHAR(orderdate, 'MONTH DD,YYYY HH:MI:SS')maskdate
FROM order_customer
ORDER BY orderda... | true |
41d5f3f15e40001807594d38b9ed7c734801072f | SQL | Maruf-Reaz/SchoolManagementApp | /db_tables/db_academic_classes.sql | UTF-8 | 814 | 2.796875 | 3 | [] | no_license | /*
SQLyog Community v13.0.1 (64 bit)
MySQL - 10.1.30-MariaDB
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
create table `db_academic_classes` (
`id` int (11),
`name` varchar (2295),
`numeric_value` int (11),
`teacher_id` int (11),
`note` varchar (2295)
);
i... | true |
705af2feb84f6f0cd155b8f4fd40dd0d8a11a220 | SQL | tanyta78/MSSQL-DatabaseBasic | /Exam221017/Exam221017/06uNASSIGNEDrEPORTS.sql | UTF-8 | 98 | 2.625 | 3 | [] | no_license | SELECT
Description,
OpenDate
FROM Reports
WHERE EmployeeId IS NULL
ORDER BY OpenDate,Description | true |
60730a7b020ca4457e01ac6cd338d866f9176920 | SQL | calistaelysia/Project-Assignment-Web-Platform-Engineers | /pokemon.sql | UTF-8 | 2,165 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 17, 2021 at 11:55 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... | true |
62af64a0b31e95c97c95812a86dfe5c2aab4247e | SQL | lopezoscar/ontrack | /OnTrack-Modules/OnTrack-Model/src/main/resources/scripts sql/sprint02/SPRINT_02_CREATE.sql | UTF-8 | 6,452 | 3.3125 | 3 | [] | 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';
CREATE SCHEMA IF NOT EXISTS `ontrack` DEFAULT CHARACTER SET utf8 ;
USE `ontrack` ;
-- ----------------------------... | true |
e46f1e7787f368f045c9502caa1781fdb07172e8 | SQL | PolluxLee/attnd-server | /src/main/resources/database/schema.sql | UTF-8 | 4,076 | 3.28125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS user(
id INT PRIMARY KEY AUTO_INCREMENT,
name varchar(255) NOT NULL,
stuid varchar(255) NOT NULL,
openid varchar(255) NOT NULL UNIQUE,
status INT NOT NULL DEFAULT 0,
remark JSON NOT NULL ,
createdat datetime NOT NULL default NOW(),
updatedat datetime NOT NULL default NOW()
)DE... | true |
3f10a4d90f48e1a9c50559117af18e4f1933c554 | SQL | Aroosa-Github/sql-challenge | /employee_database/Data Engineering SQL/Table_Schema.sql | UTF-8 | 1,204 | 3.859375 | 4 | [] | no_license |
-- DATA ENGINEERING
--Use the information you have to create a table schema for each of the six CSV files.
--Remember to specify data types, primary keys, foreign keys, and other constraints.
CREATE TABLE Departments (
dept_no varchar NOT NULL,
dept_name VARCHAR NOT NULL,
PRIMARY KEY (dept_no)
);
select... | true |
02ae2c5b53c7daf8001866af8b5527c94ef52133 | SQL | Roberto12586/Practicas-SQL | /ejercicio17.sql | UTF-8 | 302 | 3.375 | 3 | [] | no_license | # OBTENER LISTADO CON LOS ENCARGOS REALIZADOS POR EL CLIENTE FRUTERIA ANTONIA INC
SELECT e.id, c.nombre, co.modelo, e.fecha FROM encargos e
INNER JOIN clientes c ON c.id = e.cliente_id
INNER JOIN coches co ON co.id= e.coche_id
WHERE cliente_id IN
(SELECT id FROM clientes WHERE nombre = 'Fruteria Antonia'); | true |
1cb72968567fce98c08fe69d279d1165bd94e526 | SQL | RayNell-bl/SQL_practice | /sql2/sql14.sql | UTF-8 | 398 | 3.515625 | 4 | [] | no_license | SELECT u.lastname, u.firstname, u.patronomic, d.name FROM grishin_user u
INNER JOIN grishin_students s ON u.user_id = s.user_id
INNER JOIN grishin_groups gr ON s.group_id = gr.group_id
INNER JOIN grishin_graduate grad ON gr.group_id = grad.group_id
INNER JOIN grishin_graduate_time gradt ON grad.graduate_id = gradt.grad... | true |
a0f1016eebe253acb946e67a9c6555f66d3138eb | SQL | 1076044561/Java-Code-Demo | /shiro/shiro/mysql/shiro.sql | UTF-8 | 1,305 | 3.359375 | 3 | [] | no_license |
show tables;
/*用户信息表*/
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`(
`user_id` INT AUTO_INCREMENT COMMENT "用户ID",
`user_number` INT DEFAULT NULL COMMENT "用户编号",
`nick_name` VARCHAR(30) DEFAULT NULL COMMENT "昵称" ,
`login_password` VARCHAR(50) NOT NULL COMMENT "登录密码",
`salt` VARCHAR(50) DEFAULT ... | true |
4c77ad3156397c29732cd284c99e7c2a3ecd967f | SQL | lenxeon/docker | /apps/db_quartz/init/source.sql | UTF-8 | 11,500 | 3 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for osx10.11 (x86_64)
--
-- Host: mysql Database: db_quartz
-- ------------------------------------------------------
-- Server version 5.7.17-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... | true |
4ea8d7579b71babb314ca3f56e2fb4104746e4b5 | SQL | yshxdm/XD_School-management-system | /XD学籍管理.sql | UTF-8 | 2,560 | 3.578125 | 4 | [] | no_license | -- 创建student表
create database XD_School_Manager;
use XD_School_Manager;
create table Student
(
xuehao char(11) primary key,
Sname varchar(20) not null,
sex char(2) not null,
IDCard char(18),
mz varchar(10),
jguan varchar(20),
birth date,
mianmao varchar(10),
riqi date,... | true |
4f11c82e36980d1f13f072875809f6baae243ffe | SQL | BYUCS452F2020/video-course-platform | /project-files/VideoCoursePlatformTableStatements.sql | UTF-8 | 2,054 | 4.125 | 4 | [
"MIT"
] | permissive | -- Turn the foreign keys off to cleanly delete tables.
PRAGMA foreign_keys = OFF;
DROP TABLE User;
DROP TABLE Role;
DROP TABLE User_Role;
DROP TABLE Course;
DROP TABLE Enrollment;
DROP TABLE Unit;
DROP TABLE Lesson;
-- Turn the foreign keys back on.
PRAGMA foreign_keys = ON;
CREATE TABLE User (
User_Id ... | true |
b1fdaf15162d10f1f90a31ce2d453e0287a2ffed | SQL | AGLDWG/ld-link-harvester | /database/queries.sql | UTF-8 | 3,514 | 4.5 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | --QUERIES RELATED TO VALIDITY OF SEEDS
-- Retrieve a list of URIs that need to be reattempted.
SELECT seedURI, COUNT(seedURI)
FROM FailedSeed
GROUP BY seedURI
HAVING COUNT(seedURI) < 2; -- THRESHOLD GOES HERE
-- Retrieve a list of URIs that need to be Invalidated.
SELECT seedURI, COUNT(seedURI)
FROM FailedSeed
GROUP B... | true |
cddf451be50ac0b64229ba4ca69e35cefec039da | SQL | BengagiAnis/gestion_livrason | /elife (1).sql | UTF-8 | 2,319 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Sam 05 Juin 2021 à 23:36
-- Version du serveur: 5.5.8
-- Version de PHP: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACT... | true |
7a89baa62e7d517fb8de45a12eadaa3dd729677a | SQL | dxer/java_study | /zlog/src/Zlog.sql | UTF-8 | 445 | 2.625 | 3 | [] | no_license | drop database zlog;
create database zlog CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
CREATE TABLE `tb_user` (
`id` int NOT NULL AUTO_INCREMENT,
`userName` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT... | true |
00413dbe6f5a1b6c7fd49a4821d04f0790658e3e | SQL | rcmarini/ponto-inteligente-api | /src/main/resources/db/migration/mysql/V1__init.sql | UTF-8 | 1,678 | 3.734375 | 4 | [
"MIT"
] | permissive | create table `empresa` (
`id` bigint(20) not null auto_increment,
`cnpj` varchar(255) not null,
`data_atualizacao` datetime not null,
`data_criacao` datetime not null,
`razao_social` varchar(255) not null,
primary key (id)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT C... | true |
5076667a02364a55683870a7a443228ce12ee0be | SQL | Terencetang11/CS340-Databases-Project-Group-69 | /SQL Queries/Project Step 4 DML Queries - Maurence DB.sql | UTF-8 | 5,097 | 4.53125 | 5 | [] | no_license | ----- Index Table -----
-- SELECT statement for restaurant schedule
SELECT dayofWeek,
cuisines.cuisineName
FROM restaurantSchedule
LEFT JOIN cuisines on cuisines.cuisineID = restaurantSchedule.cuisineID
WHERE dayofWeek = {{dayFilter}}
AND cuisineName = {{cuisineFilter}}
-- SELECT statement for chefs on schedule
SELECT... | true |
990becaa3edad2c566996cb7a10377778581ef6d | SQL | tefanga/queveohoy | /scripts/script SQL.sql | UTF-8 | 484 | 3.1875 | 3 | [] | no_license | CREATE TABLE pelicula (
id INT NOT NULL AUTO_INCREMENT,
titulo VARCHAR(100),
duracion INT(5),
director VARCHAR(400),
anio INT(5),
fecha_lanzamiento DATE,
puntuacion INT(2),
poster VARCHAR(300),
trama VARCHAR(700),
PRIMARY KEY (id)
);
CREATE TABLE genero (
id INT NOT NULL AUTO_INCREMENT,
nomb... | true |
083c1c2d60aae22d6793a14525ce4346d0b6d5ce | SQL | BogdanFi/cmiN | /FII/L2/SGBD/anterior/teme/Tucar/Tucar_Liana_A4_2/Tucar_Liana_A4_2_2.sql | UTF-8 | 835 | 3.078125 | 3 | [] | no_license | set serveroutput on;
DECLARE
v_nr_max number:=0;
v_nume_rezultat profesori.nume%TYPE;
v_lungime number:=0;
v_id_rezultat PROFESORI.ID_PROF%TYPE;
v_nota_max note.valoare%TYPE;
BEGIN
select max(count(*)) into v_nr_max from didactic group by id_prof;
select nume, id_prof into v_nume_rezultat, v_id_rezultat ... | true |
fea341e68e860a375ff7e0449578d836a4d9e05c | SQL | sunzi1520/nashtech-springboot-demo | /src/main/resources/sample-script.sql | UTF-8 | 860 | 3.609375 | 4 | [] | no_license | --CLEAN DATABASE
drop table if exists employees;
drop sequence if exists employees_seq;
--CREATE TABLE EMPLOYEES
create table employees(
employee_id INTEGER
constraint employee_id_nn not null,
employee_name VARCHAR(50)
constraint employee_name_nn not null,
employee_email VARCHAR(25)
constraint employee_email_... | true |
37a6b5f0b13463151b20aef4c15fb97aca028f2f | SQL | ruchiapandeya/projects | /paper-crown/db/schema/create/1.0.0-ddl.sql | UTF-8 | 5,675 | 3.96875 | 4 | [] | no_license | --This script creates the database schema and tables including foreign key references and indeces.
CREATE SCHEMA IF NOT EXISTS `amber-db` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
USE `amber-db` ;
-- -----------------------------------------------------
-- Table `amber-db`.`brand`
-- ----------------------... | true |
375e3ac32aa51d1ea5663935d991d767231edf1a | SQL | erccpl/databases | /1_PLSQL/procedures/read_procedures2.sql | UTF-8 | 2,227 | 3.8125 | 4 | [] | no_license |
create or replace package read_funcs2 AS
type uczestnik_record is record (
IMIE VARCHAR2(50),
NAZWISKO VARCHAR2(50),
STATUS_REZERWACJI CHAR(1)
);
type uczestnicy_table is table of uczestnik_record;
type rezerwacja_record is record (
ID_OSOBY NUMBER,
NR_REZERWACJI NUMBER,
ID_WYCIECZKI... | true |
e2628f727d7cfb15ce578343938cc425ad3ab12e | SQL | JesseMaitland/redscope | /redscope/project/database/queries/views.sql | UTF-8 | 208 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | SELECT schemaname AS schema,
viewname AS name,
pg_get_viewdef(schemaname || '.' || viewname, TRUE) AS ddl
FROM pg_views
WHERE schemaname NOT IN ('pg_catalog', 'information_schema', 'admin');
| true |
5feeb75cb15c81f71f2a683678e46529cf37f47f | SQL | justinridout/SpringPhones | /spring_phones.sql | UTF-8 | 2,387 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64)
--
-- Host: cis175.croaukc0ws3o.us-east-2.rds.amazonaws.com Database: springphones
-- ------------------------------------------------------
-- Server version 5.7.22-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARAC... | true |
8c69616462fa919064a13df9d1cf95ace7eb2e3d | SQL | cmd16/cs262 | /Lab08/queries.sql | UTF-8 | 1,441 | 4.4375 | 4 | [] | no_license | -- Retrieve a list of all the games, ordered by date with the most recent game coming first.
-- SELECT *
-- FROM game
-- ORDER BY time DESC;
-- Retrieve all the games that occurred in the past week. Last week began on June 28, 2006.
-- SELECT *
-- FROM game
-- WHERE time >= '2006-06-28';
-- Retrieve a list of players w... | true |
a56cecdeadcd3011debcf7e97f0f8832e136c65d | SQL | zgljl2012/DataAnalystIntermediaryPlatform | /sql/db_01-2016-5-23.sql | UTF-8 | 65,259 | 3.28125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50624
Source Host : localhost:3306
Source Database : db_01
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2016-05-23 23:47:09
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
6e879beace0f119d13ecca8062c330f52f13c3ca | SQL | sonadztux/WAD-NANDA-1202184077 | /MODUL3 NANDA/wad_modul3_nanda.sql | UTF-8 | 1,912 | 2.875 | 3 | [] | no_license | -- Adminer 4.7.2 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
CREATE TABLE `event_table` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`deskripsi` text NOT NULL,
`gambar` varchar(100) NOT NU... | true |
211b9c3963f31bb7af10c153218ffbc2573e5710 | SQL | mrwnh/Fastcontent | /server/script/schemaDb_Fastcontent_db_mysql.sql | UTF-8 | 1,721 | 3.765625 | 4 | [] | no_license | --
-- Database: `fastcontent_db`
--
CREATE DATABASE IF NOT EXISTS `fastcontent_db`;
USE `fastcontent_db`;
-- ENTITIES
--
-- Struttura della tabella `project`
--
CREATE TABLE IF NOT EXISTS `project` (
`category` varchar(130) NOT NULL,
`creation_date` date NOT NULL,
`deadline` date NOT NULL,
`description` var... | true |
9d7ce37bcac4e841c9b2b9823d95ee1163871b2d | SQL | zombodb/zombodb | /test/sql/issue-285.sql | UTF-8 | 222 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | select (zdb.highlight(ctid, 'payload.commits.message'))[1]
from events
where events ==> 'payload.commits.message:*beer*' and (zdb.highlight(ctid, 'payload.commits.message'))[1] ilike '%view%'
order by id limit 10; | true |
be0802cd356db6bce1e5a2b48b24c99343decad2 | SQL | Saviorium/minipay | /core/db/src/transactions.sql | UTF-8 | 286 | 2.890625 | 3 | [] | no_license | -- DROP TABLE transactions;
CREATE TABLE transactions
(
id_from uuid NOT NULL,
id_to uuid NOT NULL,
currency character varying(15),
amount numeric,
"timestamp" timestamp
);
ALTER TABLE transactions
OWNER to minipay;
GRANT ALL ON TABLE transactions TO minipay; | true |
530144c08703d8923e9798b0c703bc766ef32c60 | SQL | moshkay/BtcUpdate | /bitcoin.sql | UTF-8 | 11,131 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 27, 2019 at 10:07 PM
-- Server version: 5.6.42
-- PHP Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
f4a7ba97d3ae09d9f4acc2be98090f250161db69 | SQL | avdasilvab25/PLSQL | /PLSQL Advanced/S4 - Colecciones/VARRAY-6.sql | ISO-8859-2 | 1,097 | 3.53125 | 4 | [] | no_license | SET SERVEROUTPUT ON;
DECLARE
TYPE EMPLEADO IS VARRAY(10) OF EMPLOYEES%ROWTYPE;
EMPLEADOS EMPLEADO := EMPLEADO(); -- SE INICIALIZA CON EL CONSTRUCTOR
BEGIN
-- BULK COLLECT
SELECT * BULK COLLECT
INTO EMPLEADOS
FROM EMPLOYEES FETCH FIRST 10 ROWS ONLY;
-- NO ES NECESARIO EXTENDER EL VARRAY, EL... | true |
e5572fb485fcfbbd3d7787fe2168eeb3ee28bb23 | SQL | JediChou/jedichou-study-backend | /sqlab/PHPNetbeansDebug_SQLComment.sql | UTF-8 | 768 | 2.953125 | 3 | [] | no_license |
--Table define
CREATE TABLE status (
id BIGINT(20) NOT NULL AUTO_INCREMENT,
name varchar(50) NOT NULL,
image varchar(100) NOT NULL,
status varchar(500) NOT NULL,
timestamp int(11) unsigned NOT NULL,
PRIMARY KEY (id)
) DEFAULT CHARSET=utf8;
-- Initial data
INSERT INTO status VALUES(null, 'Rintu Raxan', 'ri... | true |
a79290c7087064160768d970ad470947bd6e6db7 | SQL | isTheEarlyBird/springboot_mao | /ssm_mao.sql | GB18030 | 5,735 | 4.15625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS ssm_mao charset utf8;
USE ssm_mao;
-- û
CREATE TABLE user(
id VARCHAR(100) PRIMARY KEY COMMENT 'ûid',
name VARCHAR(20) NOT NULL COMMENT 'û',
password VARCHAR(20) NOT NULL COMMENT '',
createTime VARCHAR(255) NOT NULL COMMENT 'ʱ'
)default charset=utf8;
--
CREATE TABLE orderItem(
id... | true |
1d7827dad0d060929091f53c44548eff657bc91a | SQL | phuongthao101/C0221G1DaoNgocPhuongThao | /module_3/03_Database_query/excersise/insert_db_student_management.sql | UTF-8 | 979 | 4.125 | 4 | [] | no_license | use student_management;
-- Hiển thị tất cả các sinh viên có tên bắt đầu bảng ký tự ‘h’
select *
from student
where student_name like "H%";
-- Hiển thị các thông tin lớp học có thời gian bắt đầu vào tháng 12.
select *
from class
where month(start_date) = 12;
-- Hiển thị tất cả các thông tin môn học có credit trong khoả... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.