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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
32ac3fb6971abb16cdbb05ee28193a247e8df82b | SQL | Chrigferr/MP_MODSPACK | /Mods/JFD's The Empire of Byzantium (Alexios I Komnenos) (v 4)/Core/ByzantiumAlexios_GameDefines_ModSupport.sql | UTF-8 | 26,286 | 3.265625 | 3 | [] | no_license | --=======================================================================================================================
-- BINGLES CIV IV TRAITS
--=======================================================================================================================
-- Leader_SharedTraits
----------------------------... | true |
f2dc74b24cb2341a2e7e27af23e79bf43af45815 | SQL | Betaoptics/Airplane-traffic-tracker | /sql_script.sql | UTF-8 | 7,716 | 3.296875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- Tue Mar 26 16:24:41 2019
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... | true |
f4f915589cf560840d51737398a8723fc81ae52d | SQL | tuantt98/postgresql | /joining-multiple-tables/right-join.sql | UTF-8 | 959 | 4.3125 | 4 | [] | no_license | /*
Natural join
mặc định inner join
*/
-- create
DROP TABLE IF EXISTS categories;
CREATE TABLE categories (
category_id serial PRIMARY KEY,
category_name VARCHAR (255) NOT NULL
);
DROP TABLE IF EXISTS products;
CREATE TABLE products (
product_id serial PRIMARY KEY,
product_name VARCHAR (255) NOT NULL,
category... | true |
28796dd5f9c9f8e4577fe525386cf48b8541427e | SQL | Austin-Whitley/database-exercises | /select_exercises.sql | UTF-8 | 402 | 2.953125 | 3 | [] | no_license | USE codeup_test_db;
SELECT 'Pink Floyd Albums' AS 'Query One';
SELECT * FROM albums WHERE artist = 'Pink Floyd';
SELECT release_date FROM albums WHERE name = 'Sgt.Pepper''s Lonely Hearts Club Band';
SELECT name FROM albums WHERE release_date BETWEEN 1990 AND 1999;
SELECT * FROM albums WHERE genre = 'Nevermind';
SELEC... | true |
c5071e60e766e47dc7a3c5d85daee2e3dd3161e3 | SQL | Mechetel/jsAndSqlTasks | /tSlojno.sql | UTF-8 | 264 | 3.21875 | 3 | [] | no_license | SELECT cb_vendorinformation.GroupID,CompanyName,Count(*) AS "Count"
FROM cb_vendorinformation CROSS JOIN maintable_VGV1C
ON maintable_VGV1C.GroupID = cb_vendorinformation.GroupID
GROUP BY maintable_VGV1C.GroupID
ORDER BY count(*) ASC,cb_vendorinformation.GroupID
| true |
64c8fd57760a473468940f31956cc65a39dab277 | SQL | PedDavid/qip | /Server/Database/dbo/Functions/GetLinesPoints.sql | UTF-8 | 627 | 3.765625 | 4 | [
"MIT"
] | permissive | CREATE FUNCTION dbo.GetLinesPoints
(
@boardId bigint
)
RETURNS TABLE
AS
RETURN(
select fig.boardId, fig.id, point.x as linePointX, point.y as linePointY, figP.pointIdx as linePointIdx, ps.width as pointStyleWidth
from dbo.Figure as fig
inner join dbo.Line as lin
on(lin.figureId = fig.id and lin.boa... | true |
a97635d2b2acda0a3b37d17f1dffb7405b580219 | SQL | BenRKarl/WDI_work | /w03/d03/Gardner_Lonsberry/hw/domain_modeling/travel_app.sql | UTF-8 | 1,470 | 3.515625 | 4 | [] | no_license | require 'pg'
require 'active_record'
# SQL commands
CREATE DATABASE travel_app
\c travel_app
CREATE TABLE traveler
(
id serial4 PRIMARY KEY,
user_id integer,
name varchar(255),
email varchar(255),
mood varchar(100)
);
CREATE TABLE log
(
id serial4 PRIMARY KEY,
entry varchar(500)
);
CREATE TABLE entry
(
id serial... | true |
90bf0f1713600658ae8695ef876ba2af25618298 | SQL | naitoyuma3230/AcademicPresentasion | /config/mysql/create_table.sql | UTF-8 | 5,392 | 3.171875 | 3 | [] | no_license | drop table if exists journal;
-- CREATE TABLE journal (
-- id INT AUTO_INCREMENT COMMENT 'id',
-- title varchar(200) COMMENT 'タイトル',
-- presenter varchar(50) COMMENT '発表者',
-- abstract varchar(200) UNIQUE COMMENT '概要',
-- keyword1 varchar(50) COMMENT 'キーワード1',
-- keyword2 varchar(50) COMMENT 'キーワード2',
-- keyword3 ... | true |
9746698fdc6183e785c3bd17ee1dcafa571c95c5 | SQL | dead-alchemy/sql-mastery | /2_multiple-tables/lesson-7.sql | UTF-8 | 356 | 3.3125 | 3 | [] | no_license | -- less than 2000 points bronze, over 3000 is gold.
select customer_id,
last_name,
points,
'Bronze'
from customers
where points <= 2000
UNION
select customer_id,
last_name,
points,
'Silver'
from customers
where points > 2000
and points < 3000
UNION
select customer_id,
last_name,
points,
'Gold'
... | true |
b074734826a383bd2753cb27306f407140738c50 | SQL | PappLevente/sql-project | /task-4.sql | UTF-8 | 157 | 3.359375 | 3 | [] | no_license | SELECT country, COUNT(customer_id) AS number_of_costumers FROM customers
GROUP BY country
HAVING COUNT(customer_id) > 5
ORDER BY COUNT(customer_id) DESC
| true |
5bea8848df3524754018876519889b85f80970c7 | SQL | ramanraja/Home2 | /db/create4.sql | UTF-8 | 1,583 | 3.109375 | 3 | [] | no_license |
CREATE TABLE IotData (
SlNo int(11) NOT NULL AUTO_INCREMENT,
OrgId int(11) DEFAULT 1,
GroupId varchar(32) DEFAULT NULL,
DeviceId varchar(32) DEFAULT NULL,
Alive tinyint(4) DEFAULT 1,
Enabled tinyint(4) DEFAULT 1,
Relays varchar(8) DEFAULT "00",
Light smallint(4) DEFAULT 0,
Temperature float DEFAULT 0... | true |
24ed5c27cf7e2f36b632d4c9807cb07fb8c9c2cd | SQL | jeffmay/irobot_marvin | /data/marvin_init_dump.sql | UTF-8 | 1,925 | 3.234375 | 3 | [] | no_license | PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE PrimativeType (id INTEGER PRIMARY KEY, primative_name TEXT, python_name TEXT);
INSERT INTO "PrimativeType" VALUES(0,'bool','bool');
INSERT INTO "PrimativeType" VALUES(1,'int8','int');
INSERT INTO "PrimativeType" VALUES(2,'uint8','int');
INSERT INTO "PrimativeType... | true |
cfe1bdfba7376399f2810b4dede010eaea02fd7c | SQL | komusubi/lunchat | /src/main/resources/application.sql | UTF-8 | 2,773 | 3.609375 | 4 | [] | no_license | use lunchat;
drop table if exists health;
drop table if exists shippinglines;
drop table if exists shipping;
drop table if exists orderlines;
drop table if exists orders;
drop table if exists receiving;
drop table if exists payment;
drop table if exists products;
drop table if exists users;
drop table if exists groups... | true |
5f3aeeeb547948e717f3fc8b2e5479155f8e2bc3 | SQL | usbr/HDB | /oracle_script/CONSTRAINTS/ref_site_attr_ref.ddl | UTF-8 | 239 | 2.625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | alter table ref_site_attr
add constraint ref_site_attr_fk1
foreign key (site_id)
references hdb_site(site_id)
;
alter table ref_site_attr
add constraint ref_site_attr_fk2
foreign key (attr_id)
references hdb_attr(attr_id)
;
| true |
4a0df8cb0ea8c85032a32cc7c1042bba638c306b | SQL | jpdevera/sql_exam | /part2.sql | UTF-8 | 2,286 | 4.625 | 5 | [] | no_license | /**
* PLEASE make sure that all tables and columns exist
* such as (trn_teacher, trn_teacher_role, trn_time_table, trn_evaluation)
* this is based on the given pdf file ( MySQLExam.pdf )
* Execute the following
*
* USE <your_db_name>;
*/
/* 1.
Write a query to display the ff columns ID (should start
with T + 11... | true |
b98dc29c8145a47151ffb1308776af1884225fae | SQL | charrajovic/pfe | /img/destinataire_15526837548.sql | UTF-8 | 2,908 | 3.140625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : mer. 17 juin 2020 à 17:52
-- Version du serveur : 10.4.11-MariaDB
-- Version de PHP : 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... | true |
7bbe5ecd041ce9f8a7c57dacf0623b1967a2bb4d | SQL | emilianohg/express-board-game-escuela | /src/database/migration.sql | UTF-8 | 545 | 3.734375 | 4 | [] | no_license | create database boardgame;
drop table if exists boardgames;
create table boardgames
(
id int auto_increment,
name varchar(80) not null,
publisher varchar(60) not null,
category int not null,
description varchar(200) null,
year int null,
constraint boardgames_pk
primary key (id)
);
drop table if exists favori... | true |
d67c9b830666b47a2184c3d89c25aa76e8970b6c | SQL | niranjjammy/MSA6-3-2016 | /CP2_R6.5/KPMG.DBScript/Metadata/RISKDRIVER.sql | UTF-8 | 17,636 | 3.28125 | 3 | [] | no_license | SET NOCOUNT ON;
IF NOT EXISTS( SELECT 1 FROM RISKDRIVER WITH(NOLOCK)WHERE RISKDRIVER_ID = '1' )
BEGIN
INSERT INTO RISKDRIVER (RISKDRIVER_NAME , CATEGORY_ID , RISKDRIVERCONDITION,BOMBFLAGCONDITION, IS_ACTIVE , CREATED_BY , CREATED_DATE , MODIFIED_BY , MODIFIED_DATE)
SELECT 'Limitation of Liability (LOL) Beyond K... | true |
46e923723454e793ef0502de54128178ac2ec3e5 | SQL | leanh28693/car-booking | /backend/car_booking1.sql | UTF-8 | 13,491 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.1
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th10 02, 2019 lúc 11:19 AM
-- Phiên bản máy phục vụ: 10.4.8-MariaDB
-- Phiên bản PHP: 7.3.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*... | true |
0535a2e691753c03b31b712c987ceb86a5410dc7 | SQL | fred8728/SOFT_DBD_EXAM | /PostgreSQL/Test_data.sql | ISO-8859-15 | 736 | 3.5625 | 4 | [] | no_license | -- Insert operations
INSERT INTO cities VALUES (2670, 'Greve'), (2635, 'Ishj'),(4534, 'Hrve');
INSERT INTO customer (name, street, city_id, email, phone) VALUES
('Frederikke Nilsson', 'Haven 1', 2670, 'example@hotmail.com', '12345678'),
('Simone Hansen', 'Haven 2', 2635, 'example1@hotmail.com', '12345679');
INSERT... | true |
4078e7f85bbc36b270d678ed31a3e14d510468be | SQL | jkstill/oracle-script-lib | /sql/active_status.sql | UTF-8 | 601 | 3.578125 | 4 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive |
-- active_status.sql
-- show only active sessions
-- if not on a wait event, then on CPU
set linesize 200 trimspool on
set pagesize 60
col event format a30
SELECT
NVL(s.username,s.program) username
, s.sid sid
, s.serial# serial
, s.sql_hash_value sql_hash_value
... | true |
4f8578f531cdf1de150ed92d001633b5420b9fcf | SQL | git-theresa/EmployeeTracker | /db/seeds.sql | UTF-8 | 362 | 2.546875 | 3 | [
"MIT"
] | permissive | USE employee_DB;
INSERT INTO department (name)
VALUES ("accounting");
INSERT INTO roles (title, salary, department_id)
VALUES ("Manager", 75,000.00, 1);
INSERT INTO employees (first_name, last_name, role_id, manager_id)
VALUES ("Philip", "Malone", 1, null);
INSERT INTO employees (first_name, last_name, role_id, man... | true |
7bc7059505e28e88513525b898401f202afe6e52 | SQL | lcomarin/Au_Comptoir_Noirci | /Bdd.sql | UTF-8 | 5,092 | 3.515625 | 4 | [] | no_license | #--------------------------------------------------------------------------------
#-- Script SQL qui permet de créer les tables pour le projet Asp.Net
#-- Au Comptoir Noirci de Lionel COMARIN et Pierre-Antoine TRIDON
#-------------------------------------------------------------------------------
DROP Table IF EXISTS ... | true |
8ba06e07f0e364335211da307afe03a761fd122d | SQL | LorenzoDeBie/GegevensTechnologieen | /Labo_6/7-JDBC/databank_extra/create_classicmodels_extra.sql | UTF-8 | 1,796 | 3.171875 | 3 | [
"MIT"
] | permissive | /******************************************************************************
* Copyright (c) 2005 Actuate Corporation.
* All rights reserved. This file and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at... | true |
86adbc3732953f951517eca6d5528d66b13aec8b | SQL | megacharles56/portal2018 | /auxiliar/definicion1/14_tblContador.sql | UTF-8 | 893 | 3.203125 | 3 | [
"BSD-3-Clause"
] | permissive | /******************************ContadorPagina******************************/
Create Table ContadorPagina(conpa_Id Tid Constraint conpa_Id_NN Not Null
Constraint conpa_key Primary Key,
conpa_cantidad integer,
conpa_pagina t... | true |
d140df2617cde0b9f8d554784bc928f5011463b7 | SQL | radtek/abs3 | /sql/mmfo/bars/Table/cons2valid.sql | UTF-8 | 3,783 | 2.78125 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/CONS2VALID.sql =========*** Run *** ==
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
a89fb4b791809ab18fe76148dc292c3b1c1a9ae5 | SQL | vinind/plsql_Sathiya | /src_sysdba.sql | UTF-8 | 918 | 3.15625 | 3 | [] | no_license | create user sathiya identified by pass123;
grant connect to sathiya;
grant select on hr.employees to sathiya;
grant all privileges to sathiya;
/
create user vinay1 identified by pass123;
grant connect to vinay1;
grant all privileges to vinay1;
/
create user martin identified by pass123;
grant connect to martin;
grant a... | true |
9b10e3e6a9b890c8ba1270ad871708b9021a7947 | SQL | EstefanyMM/Challenge-Submission | /ModelarQuerys.sql | UTF-8 | 1,959 | 3.984375 | 4 | [] | no_license | --Obra/año/Quarter /Numero de veces alquilado
select
NombreEvento,
year(FechaFinal) as anio,
datepart(quarter, FechaFinal) as Trimestre,
count(*) as #vecesAlquiladas
From examen.Orden as o
inner join examen.DetalleOrden as do
on o.IdOrden = do.IdOrden
group by NombreEvento,
year(FechaFinal),
... | true |
156cb258ac91a4c8a7c68a5df8c580d2191c5906 | SQL | albothyl/project1006 | /kanban-domain/src/main/resources/db/migration/V1__CreateTable.sql | UTF-8 | 1,218 | 3.546875 | 4 | [] | no_license | USE kanban;
CREATE TABLE `cards` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '시퀀스',
`title` varchar(50) NOT NULL COMMENT '작업명',
`description` varchar(200) NOT NULL COMMENT '작업에 대한 상세 설명',
`status` varchar(15) NOT NULL COMMENT '작업의 진행 상태 [TODO, IN-PROGRESS, IN-QA, DONE, CLOSE] ',
... | true |
f38956fe4f8bebdc14b3c66926eb58b8b757ec7f | SQL | ThisUsedToBeAnEmail/podsearch | /podsearch.sql | UTF-8 | 433 | 2.78125 | 3 | [] | no_license | CREATE TABLE modules (
id SERIAL PRIMARY KEY NOT NULL,
name text,
version text
);
CREATE TABLE pod (
id SERIAL PRIMARY KEY NOT NULL,
module_id integer REFERENCES modules(id) ON DELETE CASCADE ON UPDATE CASCADE,
identifier text,
title text,
conte... | true |
25aff7bf8eb395476dafee7368e91d9df4258455 | SQL | yujintao529/spider | /spider.sql | UTF-8 | 904 | 3.96875 | 4 | [
"Apache-2.0"
] | permissive | -- we don't know how to generate schema spider (class Schema) :(
create table note
(
id int auto_increment
primary key,
create_time timestamp default CURRENT_TIMESTAMP null,
title varchar(50) not null,
constraint note_id_uindex
unique (id),
constraint note_title_uindex
unique (title)
)
comment '小说'
;
create... | true |
ab30f2d0b02f483c2c0500d7fb9b2f9993056b25 | SQL | gclirsky/mybatis3-example | /src/main/resources/database/ORACLE-schema.sql | UTF-8 | 885 | 3.453125 | 3 | [] | no_license | DROP TABLE t_image;
DROP TABLE t_text;
DROP TABLE t_account_address;
DROP TABLE t_account;
CREATE TABLE t_image(
id CHAR(36)
,image_data BLOB NOT NULL
,created_at TIMESTAMP NOT NULL
,CONSTRAINT t_image_pk PRIMARY KEY (id)
);
CREATE TABLE t_text(
id CHAR(36)
,text_data CLOB NOT NULL
,created_at TIMESTAMP N... | true |
1d013d579a84da8c74dd7dca592fabad67420f03 | SQL | pq27120/jfinal_git_maven | /git_api/db/dormitory.sql | UTF-8 | 750 | 3.25 | 3 | [] | no_license | -- 宿舍人员表
create table user (
id int(8) auto_increment not null primary key,
name varchar(20) not null
comment '名字',
time datetime not null
comment '最后编辑时间'
)
comment '宿舍人员表';
-- 缴费/开销表
create table pay (
id int(8) auto_increment not null primary key,
remark varcha... | true |
82eaefaf0b63fdd6a222c13a3343bafd6518227c | SQL | kleingeist1/firewall-orchestrator | /roles/database/files/sql/idempotent/fworch-views.sql | UTF-8 | 26,573 | 3.484375 | 3 | [
"Apache-2.0"
] | permissive |
---------------------------------------------------------------------------------------------
-- object views
---------------------------------------------------------------------------------------------
CREATE OR REPLACE VIEW view_obj_changes AS
SELECT
abs_change_id,
log_obj_id AS local_change_id,
get_request_... | true |
b621218d76f41f66304417c0504668828c12c397 | SQL | steveio/365admin.org | /scripts/gapyear365_filter_update.sql | UTF-8 | 4,650 | 3.5625 | 4 | [] | no_license |
$dsn = array("dbhost" => "localhost","dbuser" => "postgres", "dbpass" => "p0stgr3s","dbname" => "oneworld365","dbport" => "5432");
Running Order
1.
DELETE FROM comp_cat_map WHERE category_id = 7;
DELETE FROM prod_cat_map WHERE category_id = 7;
2.
php ./company_category_update.php > company_category_update.sql
3... | true |
8b6041e55dffc3e104d794cdef58abca06045f9d | SQL | datacentricity/log4tsql | /Log4TSql/Log4TSql_2008/Tables/log4Private.Journal.sql | UTF-8 | 1,423 | 2.84375 | 3 | [
"MIT"
] | permissive | CREATE TABLE [log4Private].[Journal] (
[JournalId] INT IDENTITY (1, 1) NOT NULL,
[UtcDate] DATETIME CONSTRAINT [DF_Journal_UtcDate] DEFAULT (getutcdate()) NOT NULL,
[SystemDate] DATETIME CONSTRAINT [DF_Journal_SystemDate] DEFAULT (getdate()) NOT NULL,
[Ta... | true |
d50a6751aa5f99119df2962fad1f1625a6e449f9 | SQL | mply/RuddockWebsite | /database/test_data.sql | UTF-8 | 1,840 | 3.015625 | 3 | [
"MIT"
] | permissive | /*
* Populates the database with a static set of test data.
*/
INSERT INTO membership_types
(member_type, membership_desc, membership_desc_short)
VALUES
(1, 'Full Member', 'Full'),
(2, 'Social Member', 'Social'),
(3, 'Associate Member', 'Associate'),
(4, 'Resident Associate', 'RA');
INSERT INTO members
... | true |
e665393076369ce13ed8e4e7a9b4faf5aa716bb3 | SQL | uriborn/sangria-clean-architecture | /modules/infrastructure/conf/db/migrations/V20190819202500__initial_data.sql | UTF-8 | 733 | 2.53125 | 3 | [] | no_license | INSERT INTO `droid` (`id`, `name`, `primary_function`)
VALUES
(1,'C-3PO','Protocol'),
(2,'R2-D2','Astromech');
INSERT INTO `droid_episode` (`droid_id`, `episode_id`)
VALUES
(1,1),
(1,2),
(1,3),
(2,1),
(2,2),
(2,3);
INSERT INTO `episode` (`id`, `name`)
VALUES
(1,'NewHope'),
(2,'Empire'),
(3,'Jedi... | true |
196af0fb899c45f60c0fbed0d2e3e01b5803c36f | SQL | Maliman-Org/BookWebService | /BooksService/bookdb.sql | UTF-8 | 1,900 | 3.484375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : sam. 26 oct. 2019 à 00:36
-- Version du serveur : 10.1.26-MariaDB
-- Version de PHP : 7.1.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
3142e90b0125f611ff1f88043322c7451d07cf60 | SQL | au-research/ANDS-ResearchData-Registry | /etc/db/mysql/dbs_statistics_r11_full.sql | UTF-8 | 1,384 | 3.125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CREATE DATABASE `dbs_statistics` /*!40100 DEFAULT CHARACTER SET utf8 */
CREATE TABLE `citations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`data_source_id` mediumint(8) unsigned NOT NULL,
`collection_count` int(11) DEFAULT '0',
`fullCitation_count` int(11) DEFAULT '0',
`citationMetadata_count` int(11) DEFAULT... | true |
2124e692911c9dd7442123b2e6f3c2375a13552a | SQL | silentbalanceyh/vertx-zero | /vertx-pin/zero-erp/src/main/resources/plugin/sql/erp/E_CONTRACT.sql | UTF-8 | 3,523 | 3.5 | 4 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | -- liquibase formatted sql
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- changeset Lang:h-contract-1
-- ----------------------------
-- Table structure for E_CONTRACT
-- ----------------------------
DROP TABLE IF EXISTS `E_CONTRACT`;
CREATE TABLE `E_CONTRACT`
(
`KEY` VARCHAR(36) NOT NULL COMMENT '「k... | true |
458015ab4cdbbb83d57897cc9da2f502d867714f | SQL | DIBYA03/TF-code | /WISE/core-platform/migrations/transaction/00004_business_account_daily_balance.sql | UTF-8 | 924 | 3.140625 | 3 | [] | no_license | -- +goose Up
/* Business bank account table */
CREATE TABLE business_account_daily_balance (
id uuid PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(),
account_id uuid NOT NULL,
business_id uuid NOT NULL,
posted_balance double prec... | true |
8e8ada2a81cfba2bd8440f15a180fbe13636566b | SQL | madehim/sql-ex.Solutions | /sql-ex select/49.sql | UTF-8 | 337 | 3.78125 | 4 | [] | no_license | -- Find the names of the ships having a gun caliber of 16 inches (including ships in the Outcomes table).
SELECT a.name
FROM
(SELECT a.ship name, a.ship as class
FROM Outcomes a WHERE a.ship NOT IN(SELECT name FROM Ships)
UNION
SELECT name, class FROM Ships) a
JOIN (SELECT class FROM Classes WHERE bore=16) b
ON... | true |
48b60505a71fcf9731eab1a5141a27f3ba5446c9 | SQL | Asthamor/ProyectoDesarrolloSW-EQ1 | /Proyecto/AredDBSchema.sql | UTF-8 | 16,769 | 3.296875 | 3 | [] | no_license | -- MySQL Script generated by MySQL Workbench
-- mié 06 jun 2018 09:31:35 CDT
-- 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... | true |
a2c8d504828ba53400bded181972850422169f6e | SQL | jcandia2/database-exercises | /functions_exercises.sql | UTF-8 | 1,147 | 4.25 | 4 | [] | no_license | # Update your queries for employees whose names start and end with 'E'
# concat() to combine their first and last name together as a single column in your results.
SELECT concat(e.first_name," ",e.last_name)
as Full_Name
FROM employees as e
WHERE e.last_name LIKE 'E%' and e.last_name like '%e'
ORDER BY e.last_name;
# ... | true |
0a2ac2ee15880f85a8bff4402708e6e422245adb | SQL | Echoes3/HOTEL_SQL | /ALGOTP2_Gestion Hôtel_requetes_F2A_DEBABECHE_BENJAMIN.sql | UTF-8 | 4,990 | 3.875 | 4 | [] | no_license | --Nombre de clients
SELECT count ( CLI_ID)
FROM T_CLIENT
--Les clients triés sur le titre et le nom
SELECT *
FROM T_CLIENT
ORDER BY TIT_CODE, CLI_NOM
--Les clients triés sur le libellé du titre et le nom
SELECT *
FROM T_CLIENT, T_TITRE
ORDER BY TIT_LIBELLE, CLI_NOM
--Les clients commençant par 'B'
SELECT C... | true |
a9c50e08ccb56690dcbc7337f2f9766bc6501609 | SQL | Indigerd/yii-oauth2server | /demo/blog/protected/extensions/oauth2server/data/schema.mysql.sql | UTF-8 | 2,439 | 2.921875 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS `tbl_oauth2server_clients` (
`id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
`secret` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`auto_approve` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 CO... | true |
cd8eae2f11951d7c074d6c00d7aa3e6a7053c409 | SQL | faziz/assignment | /sql/project.sql | UTF-8 | 1,058 | 3.5 | 4 | [] | no_license | DROP TABLE IF EXISTS address CASCADE;
CREATE TABLE address (
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ADDRESS1 VARCHAR(20) NOT NULL,
ADDRESS2 VARCHAR(20),
CITY VARCHAR(20) NOT NULL,
STATE VARCHAR(20)
) ENGINE = innodb;
DROP TABLE IF EXISTS user CASCADE;
CREATE TABLE user (
ID ... | true |
01791ca9b910e2fcc631987e9bee3dccf1fbc214 | SQL | TheLastManSleeping/SUBD | /task6.sql | UTF-8 | 284 | 2.921875 | 3 | [] | no_license | use MyData;
select '1' as 'missing letters', count(name1) from name
where name1 like concat('%', left('Артур', char_length('Артур') - 1), '%')
union
select '2', count(name1) from name
where name1 like concat('%', left('Артур', char_length('Артур') - 2), '%'); | true |
62a2bdbf99d4d6d8205f630ca953804277c79d6d | SQL | Puntsik/Community-Patch-DLL | /Community Patch/Core Files/Core Changes/TextChanges.sql | ISO-8859-1 | 2,127 | 2.6875 | 3 | [] | no_license | -- Fixed diacritics for spy names.
UPDATE Language_en_US
SET Text = 'Antnio'
WHERE Tag = 'TXT_KEY_SPY_NAME_BRAZIL_0' AND EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE' AND Value= 1 );
UPDATE Language_en_US
SET Text = 'Estvo'
WHERE Tag = 'TXT_KEY_SPY_NAME_BRAZIL_3' AND EXISTS (SELECT * FROM COMMUN... | true |
b43557a0d905e2544b1d51affb480b92b74c8492 | SQL | Pasha777-m/Databases_and_information_systems_Univ_sem_6 | /lab1/main.sql | UTF-8 | 631 | 3.34375 | 3 | [
"MIT"
] | permissive | CREATE TABLE "users" (
"id" SERIAL PRIMARY KEY,
"nick" TEXT,
"password" TEXT,
"salt" TEXT
);
CREATE TABLE "canvasses" (
"id" INTEGER PRIMARY KEY,
"title" TEXT,
"owner_id" INTEGER
);
CREATE TABLE "notes" (
"id" INTEGER PRIMARY KEY,
"title" varchar,
"canvas_id" INTEGER NOT NULL,
"owner_id" INTEGER... | true |
d86eb495405c41aa9edb54ca6018868534fe9ab5 | SQL | xeeshansoftech/Akhpal-Kaar | /Reports/Equity/Periodic Report designer/OOP_Script.sql | UTF-8 | 6,314 | 3.34375 | 3 | [] | no_license | create type colnames as object
(
colname varchar2(50)
)
/
create type colnames_tb as table of colnames
/
create type clearing as object
(
cler varchar2(50)
)
/
create type clearing_tb as table of clearing
/
create type tradetype as object
(
trade varchar2(5)
)
/
create type tradetype_tb as table of tradetype
/... | true |
a155f38c3a1b3730f37ef63f8106afd268e972f9 | SQL | PauloFernandez/Sistema-Venta | /Esquema BD/sistema_ventas_t_cliente.sql | UTF-8 | 2,502 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: sistema_ventas
-- ------------------------------------------------------
-- Server version 8.0.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
dc7e1d2d313aef2143cc5dd4469bb450409ed8a4 | SQL | BRUCELLA2/ModernLibrary2 | /Database/CreateDataBase.sql | UTF-8 | 8,208 | 3.3125 | 3 | [] | no_license |
CREATE SEQUENCE public.user_options_user_options_id_seq;
CREATE TABLE public.user_options (
user_options_id INTEGER NOT NULL DEFAULT nextval('public.user_options_user_options_id_seq'),
before_reminder BOOLEAN NOT NULL,
CONSTRAINT user_options_pk PRIMARY KEY (user_option... | true |
46a73c0206efdc055c09a37f4b70d528ce903d96 | SQL | pinax/pinaxproject.com | /pinaxsite_project/migrations/003_add_commit_and_person.sql | UTF-8 | 1,265 | 3.453125 | 3 | [] | no_license | ### New Model: packages.Person
CREATE TABLE "packages_person" (
"id" serial NOT NULL PRIMARY KEY,
"date_created" timestamp with time zone NOT NULL,
"date_modified" timestamp with time zone,
"name" varchar(128) NOT NULL,
"login" varchar(64) NOT NULL,
"email" varchar(128) NOT NULL
)
;
### New Mode... | true |
b6b0b836dd2c5c0757fe9aac1a89bb202cc037ae | SQL | kartikaditya/flux | /persistence-mysql/src/main/resources/migrations/create_tables.sql | UTF-8 | 2,667 | 3.703125 | 4 | [
"Apache-2.0"
] | permissive | --liquibase formatted sql
--changeset flux:1
CREATE TABLE IF NOT EXISTS `AuditRecords` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`stateMachineInstanceId` VARCHAR(100) NOT NULL,
`stateId` VARCHAR(100) NOT NULL,
`retryAttempt` TINYINT UNSIGNED DEFAULT NULL,
`stateStatus` VARCHAR(100) DEFAULT NULL,
`st... | true |
149e5641f2dd1312915a773d3dcd7fda28914851 | SQL | allmp13/IWSSQL | /mssql/testdossier.sql | UTF-8 | 291 | 3.296875 | 3 | [] | no_license | SELECT C_REFDEM,count(C_REFDEM) AS COMPTE FROM LIGNEDEM /*WHERE C_REFDEM LIKE 'T%'*/ GROUP BY C_REFDEM ORDER BY COMPTE DESC
SELECT D.*,L.* FROM APPEL D INNER JOIN LIGNEDEM L ON D.NO_APPEL=L.NO_APPEL
SELECT * FROM Z_LOV_VALUE WHERE C_LOV_VALUE='P'
SELECT * FROM Z_LOV WHERE L_LOV LIKE '%p%' | true |
f53a66c8f11fdee9fea5d967c6bfecb70dd0bb76 | SQL | Uugne/second_sprint_PHP_CRUD | /sql_dump.sql | UTF-8 | 3,100 | 3.296875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `php2021` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `php2021`;
-- MySQL dump 10.13 Distrib 8.0.25, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: php2021
-- ------------------------------------------------------
--... | true |
671f549beacaaa82c8ff347d9c86cde2cf19341f | SQL | vitortomic/code-bucket | /sql/lateral_cross_join_examples.sql | UTF-8 | 1,326 | 3.53125 | 4 | [] | no_license | SELECT
workflow_instance_variables -> 'claimPaidDate' ->> 'value',
(VALUE ->> 'start')
FROM insurance2.claim
CROSS JOIN LATERAL jsonb_array_elements((workflow_instance_variables -> 'stateLog' ->> 'value')::jsonb)
WHERE
(VALUE ->> 'state') = 'Paid' AND
(
workflow_instance_variables -> 'claimPaidDate' ->... | true |
9d66bb052f76f9312fb36bfe9fe496a6d1b1af05 | SQL | vgoel38/PQET | /inputs/really_final_outputs/without_index/original/23a.sql | UTF-8 | 9,891 | 2.734375 | 3 | [] | no_license | QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------... | true |
818817b406a590adea9dfda624cba2da13d9a211 | SQL | maqilin-ustcinfo/cms | /cms/pm_sys_init.sql | UTF-8 | 16,374 | 3.03125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 60011
Source Host : localhost:3306
Source Database : oa
Target Server Type : MYSQL
Target Server Version : 60011
File Encoding : 65001
Date: 2017-05-08 20:41:07
*/
SET FOREIGN_KEY_... | true |
83a96c0081b69802126da49cf2c5c99e6a3ed245 | SQL | adriancglez/oracle-pl-sql-course | /05_Excepciones/07_Ejercicios_Excepciones_Personalizadas.sql | UTF-8 | 1,033 | 3.453125 | 3 | [] | no_license | -- PRÁCTICA 1
/* Crear una excepción personalizada denominada `CONTROL_REGIONES`
* Debe dispararse cuando al insertar o modificar una región queramos poner una clave superior a 200. Por ejemplo, usando una variable con ese valor.
* En ese caso debe generar un texto indicando algo así como "Código no permitido. Debe se... | true |
1fb334523a0e4a535ab3f5f32eb43c97932b30d4 | SQL | Michael22936/database-exercises | /shoes_migration.sql | UTF-8 | 337 | 2.953125 | 3 | [] | no_license | USE codeup_test_db;
DROP TABLE IF EXISTS shoes;
CREATE TABLE shoes(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
color VARCHAR(255) DEFAULT 'no color',
product_description TEXT,
rating INT,
price DOUBLE(7,2) NOT NULL,
in_stock INT NOT NULL,
date_delivered DATE,
size INT NOT NULL,
PR... | true |
9fc507362ccebdaf95334edf00096f5a7d318846 | SQL | tnebes/edunova-jp23 | /java_sql_sandbox/my_exercises/1/exercise_4.sql | UTF-8 | 192 | 2.6875 | 3 | [] | no_license | # Izlistajte kratkamajica iz tablice zena uz uvjet da vrijednost kolone hlace sadrže slova ana.
use midterm_exercise_1;
select kratkamajica from zena where hlace like '%ana%';
# < 1 minute | true |
a70008ef8019bcf50f3576d9b8c586cbdbd275f0 | SQL | gustavorattmann/producao-centralizada | /database/create_database.sql | UTF-8 | 4,025 | 3.875 | 4 | [] | no_license | USE producao_centralizada;
DROP TABLE IF EXISTS production;
DROP TABLE IF EXISTS orders;
DROP TABLE IF EXISTS status_orders;
DROP TABLE IF EXISTS raw_materials;
DROP TABLE IF EXISTS products;
DROP TABLE IF EXISTS category;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS roles;
CREATE TABLE IF NOT EXISTS roles
(
id ... | true |
872cc94a915b03341e34d05796b99a1352a30b79 | SQL | corverroos/truss | /testdata/schema.sql | UTF-8 | 705 | 2.890625 | 3 | [] | no_license | -- Schema generated by truss. DO NOT EDIT.
CREATE TABLE `migrations` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`query_hash` char(64) NOT NULL,
`schema_hash` char(64) NOT NULL,
`created_at` datetime(3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
CREATE TABLE `test1` (
`id` bigint(... | true |
919f0d432a1929c2297ddd4281b1cc9d245b9b27 | SQL | neostreet/poker_session_data | /mtt_8game_percentile.sql | UTF-8 | 282 | 2.890625 | 3 | [] | no_license | use poker
select (num_entries - place) / num_entries,place,num_entries,places_paid,winnings,
concat(poker_session_date,tournament_letter)
from poker_sessions
where poker_style = 2 and poker_flavor = 9 and
num_entries is not null and place is not null
order by 1 desc,6 desc;
quit
| true |
5ef9efc0361a0a80891738c9e6a3c53a7437715a | SQL | sfallou/location | /location.sql | UTF-8 | 26,243 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.1
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : Dim 23 juil. 2017 à 05:20
-- Version du serveur : 5.7.18
-- Version de PHP : 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
9233833bdf53dea0bcca4699abe8c2815140285c | SQL | escuccim/countries-currencies-languages | /currencies.sql | UTF-8 | 13,530 | 2.71875 | 3 | [
"MIT"
] | permissive | INSERT INTO `currencies` VALUES (1, 'Afghanistan', 'Afghan afghani', 'AFN', 'AFN');
INSERT INTO `currencies` VALUES (3, 'Albania', 'Albanian lek', 'ALL', 'ALL');
INSERT INTO `currencies` VALUES (4, 'Algeria', 'Algerian dinar', 'DZD', 'دج');
INSERT INTO `currencies` VALUES (6, 'Angola', 'Angolan kwanza', 'AOA', 'Kz');
I... | true |
fe52a5d61331a75ae7b48eb49034482ca58236f8 | SQL | namonlyone84/nfq-assignment-bidding-system | /src/main/resources/schema.sql | UTF-8 | 364 | 2.96875 | 3 | [] | no_license | CREATE TABLE user (
id BIGINT NOT NULL auto_increment,
userName VARCHAR (45),
firstName VARCHAR (45),
lastName VARCHAR (45),
PRIMARY KEY (ID)
);
CREATE TABLE job (
id BIGINT NOT NULL,
caption VARCHAR (512),
description VARCHAR (1024),
status VARCHAR (45),
price BIGINT,
currencyCode VARCHAR (45),
... | true |
a5eb07afa54cafab029a304a0ed5c6b4826cf6b8 | SQL | viethoang98/crud_laravel | /laravel.sql | UTF-8 | 5,621 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th10 11, 2020 lúc 11:20 AM
-- Phiên bản máy phục vụ: 10.4.14-MariaDB
-- Phiên bản PHP: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
1744f86fc7dd1df46f53cdeed5b34a3b1405a8a5 | SQL | shamshadt/WheelsUp | /db/fc.sql | UTF-8 | 39,075 | 2.96875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 16, 2019 at 01:42 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
0d3f504187e7d7c3b67adc4081091761a246bfc2 | SQL | tekchandk/DBMS | /DBMS/assignment1/5.sql | UTF-8 | 147 | 3.140625 | 3 | [] | no_license | select count(distinct fl.film_id) from actor a,film_actor fa
where a.first_name ='SEAN' and a.last_name='WILLIAMS' and fa.actor_id = a.actor_id;
| true |
9ffb7af2adbf1847979000e29daeb9ee7efc4366 | SQL | shersingh7/DBS211 | /Week 5/Quiz 3.sql | UTF-8 | 588 | 3.34375 | 3 | [] | no_license | CREATE TABLE STUDENT
(
Campus_no Char(1) CONSTRAINTS STUDENT_Campus_no PRIMARY KEY,
mn Numeric(3) CONSTRAINTS STUDENT_mn PRIMARY KEY,
Stud_lname Char(15),
Stud_fname Char(15),
Stud_pgm Char(3) CONSTRAINTS PGM_Pgm_id FOREIGN KEY (Pgm_id) REFERENCES PGM(Pgm_id)
DEFAULT('CPA'),
Locker_no Numeric(3) CONSTRAINTS STUDENT_L... | true |
9d5d06e8016fc4cba845a4804e8243484772fca6 | SQL | DarknessRdg/sistemas_escolar_em_bd | /insert_basicos.sql | UTF-8 | 1,730 | 3.359375 | 3 | [] | no_license | -- ALUNO
insert into aluno(id_aluno, nome_aluno, nascimento_aluno, matricula_aluno) values
(1, 'jose pereira silva', '2000-12-10', '1234aluno'),
(2, 'geovana garcia soares', '2005-4-1', '4412aluno'),
(3, 'larissa santana rodigues de pinheiro', '1999-7-25', '31321aluno'),
(4, 'arthur de clara farias neto', '2004-1-6', '... | true |
a45332c4c38597a188f53085783f9a898888ba9e | SQL | bntmobile/MDM | /Herdez/Querys/Recursos/VALIDA MDS CONVERSIONES DUPLICADAS POR RECURSO.sql | ISO-8859-1 | 635 | 3.859375 | 4 | [] | no_license | SELECT
PP.[Nmero de Recurso] IdRecurso
,CONV.[De Unidad de Medida_Name]
,CONV.[A Unidad de Medida_Name]
,CONV.Factor
,COUNT(1)CUENTA
FROM [HSVDMDDBPPSQL].[MDMHERDEZ].[mdm].[vwMDM_ModeloProductos] PP with(nolock)
LEFT JOIN [HSVDMDDBPPSQL].[MDMHERDEZ].[mdm].[vwMDM_Productos_Converc... | true |
39002ebb2515814b3eaf650a2eb7988224d8e9db | SQL | davidgit888/opdashboard | /static/smallparts/smallparts.sql | UTF-8 | 11,246 | 2.6875 | 3 | [] | no_license | -- --------------------------------------------------------
-- 主机: 127.0.0.1
-- Server version: 8.0.15 - MySQL Community Server - GPL
-- Server OS: Win64
-- HeidiSQL 版本: 10.1.0.5464
-- --------------------------------------------------------
/... | true |
d248fe89fc72039dac30808a0a7c80af784f3216 | SQL | DavingToT/JavaOracleJdbc | /03. ERD+Script_/쿼리(Script)/쿼리(Script)/교사_강의조회.sql | UTF-8 | 2,138 | 4.1875 | 4 | [] | no_license | --강의 조회
--선생님 이름 / 날짜 / 과목
SELECT
DISTINCT
a.seq AS "교사번호",
a.name AS "교사" ,
SYSDATE AS "날짜",
-- e.start_date AS "과목시작일",
-- e.end_date AS "과목종료일",
c.name AS "과목명"
FROM Teacher A
INNER JOIN LecturableSubject B ON A.seq = B.teacher_seq
INNER JOIN Subject C ... | true |
8ab048cd4cd17bb4f322919fa935439e50ad60f3 | SQL | daewon-heo/OracleSrc | /과제/03/과제_워크샵3.sql | UTF-8 | 5,238 | 4.375 | 4 | [] | no_license | -- ORACLE 과제 WORKSHOP3
-- 허대원
--1. 학생이름과 주소지를 표시하시오. 단, 출력 헤더는 "학생 이름", "주소지"로 하고,
--정렬은 이름으로 오름차순 표시하도록 핚다.
SELECT
STUDENT_NAME "학생 이름",
STUDENT_ADDRESS "주소지"
FROM TB_STUDENT
ORDER BY 1;
--2. 휴학중인 학생들의 이름과 주민번호를 나이가 적은 순서로 화면에 출력하시오.
SELECT
STUDENT_NAME,
STUDENT_SSN
FROM TB_STUDENT
WHERE ABSENCE_YN ... | true |
604139b454f3b9edb6cdcff09a12a8380c3a9366 | SQL | hwingerter/companysystem | /sql/Criacao das areas do sistema.sql | UTF-8 | 364 | 2.546875 | 3 | [] | no_license | CREATE TABLE `area` (
`cod_area` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(45) DEFAULT NULL,
PRIMARY KEY (`cod_area`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
insert into area (nome) values ('Sistema');
insert into area (nome) values ('Cadastros');
insert into area (nome) values ('Caixa');
in... | true |
cd4bc483e5ea9e50b2d67ca5c50ce2ddd6d8254a | SQL | rajivit53/ProjectDemo | /guestbook/sqlscript/guest_directory.sql | UTF-8 | 1,431 | 3.34375 | 3 | [] | no_license | DROP DATABASE IF EXISTS `guest_directory`;
CREATE DATABASE IF NOT EXISTS `guest_directory`;
USE `guest_directory`;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`enabled` tinyint(1) NOT NULL,
... | true |
4982db394e0d4e35d397e15c947f199c7a95922a | SQL | sumit-subedi/Cafeteria-Management | /Dump20191102.sql | UTF-8 | 3,258 | 3 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.17, for Linux (x86_64)
--
-- Host: localhost Database: sumit
-- ------------------------------------------------------
-- Server version 8.0.17-0ubuntu2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... | true |
81850e369133e1f6956c669ebb94c041cfab1279 | SQL | zhaoy1992/xtbg-whtjy-new | /.svn/pristine/81/81850e369133e1f6956c669ebb94c041cfab1279.svn-base | UTF-8 | 185 | 2.578125 | 3 | [] | no_license | -- Add/modify columns
alter table OA_FLOW_DOCUMENT_FILE add recordid VARCHAR2(50);
-- Add comments to the columns
comment on column OA_FLOW_DOCUMENT_FILE.recordid
is '正文id'; | true |
eca879dcfe49b087e0f9e1ddf67ee3ce3413b911 | SQL | safecornerscoffee/spring-webmvc-mocha | /database/schema.sql | UTF-8 | 1,567 | 3.921875 | 4 | [] | no_license | CREATE TABLE account (
id BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
address1 VARCHAR(255),
address2 VARCHAR(255),
city VARCHAR(255),
state VARCHAR(255),... | true |
db75b8880c1fea2d857ee150df1abbae2be51394 | SQL | sjm3031/Final_Project | /team_cafe.sql | UHC | 15,479 | 3.8125 | 4 | [] | no_license |
-------------------------------------------------------------------------------------------------------------------------------
--
-------------------------------------------------------------------------------------------------------------------------------
DROP TABLE CAFE_CUSTOMER;
--̺
create table CAFE_... | true |
9e535e747f4ce112948e272a07bc370f670323ad | SQL | MohamedMedhat96/phone-directory-app | /src/main/resources/data.sql | UTF-8 | 699 | 3.015625 | 3 | [] | no_license | create table IF NOT EXISTS country (id INTEGER primary key , name TEXT not null unique , code TEXT not null unique, regex TEXT not null unique );
insert or IGNORE into country(id, name , code, regex) values(1, 'Cameroon', '+237', '\(237\)\ ?[2368]\d{7,8}$');
insert or ignore into country(id, name , code, regex) values... | true |
fbbdd24569c08dfec36329fdb34faa0fdd6a0259 | SQL | jactapular/ICP_4 | /Database/Exports/Query_Projects.sql | UTF-8 | 110 | 2.578125 | 3 | [] | no_license | SELECT projID AS 'ProjectID', name AS 'Project Owner', projName AS 'Project Name' FROM Proj
NATURAL JOIN Cust; | true |
2898a293be746caf9fc6c1c27ff93337c6a0209b | SQL | edgiru/livegpstrack | /track.sql | UTF-8 | 1,614 | 3.125 | 3 | [] | no_license | -- Adminer 3.7.1 MySQL dump
SET NAMES utf8;
SET foreign_key_checks = 0;
SET time_zone = '+04:00';
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `archive`;
CREATE TABLE `archive` (
`name` varchar(255) NOT NULL,
`lat` varchar(255) NOT NULL,
`lon` varchar(255) NOT NULL,
`hdop` float NOT NULL,
`t... | true |
17d7aa9d45decf7e709f0372aef9d523f0078466 | SQL | prestodb/presto | /presto-product-tests/src/main/resources/sql-tests/testcases/window_functions/rangeCurrent.sql | UTF-8 | 196 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | -- database: presto; groups: window;
SELECT nationkey, min(nationkey) OVER (PARTITION BY regionkey ORDER BY comment RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS min FROM tpch.tiny.nation
| true |
45bdade908dd252f748f4728d47d012a2d14c6ab | SQL | radtek/Telecommunication | /GSM/DataBase/TABLES/BEELINE_SOAP_API_ERR.sql | UTF-8 | 597 | 3.21875 | 3 | [] | no_license | -- Create table
create table BEELINE_SOAP_API_ERR
(
soap_err_id INTEGER not null,
err_code VARCHAR2(6),
err_eng_text VARCHAR2(2000),
err_rus_text VARCHAR2(2000)
);
-- Create/Recreate indexes
create index I_BSAE_ERR_CODE on BEELINE_SOAP_API_ERR (ERR_CODE);
-- Create/Recreate primary, unique and foreign key... | true |
d8f67340e38ddaabfda958b9f33f6be158181482 | SQL | Tangol/Osclass-Locations | /locations/TW-Taiwan.sql | UTF-8 | 9,730 | 2.78125 | 3 | [] | no_license | REPLACE INTO /*TABLE_PREFIX*/t_country (pk_c_code, s_name, s_slug) VALUES
('TW', 'Taiwan', 'taiwan');
REPLACE INTO /*TABLE_PREFIX*/t_region (pk_i_id, fk_c_country_code, s_name, b_active, s_slug) VALUES
(1003404, 'TW', 'Changhua County', 1, 'changhua-county');
REPLACE INTO /*TABLE_PREFIX*/t_city (pk_i_id, fk_i_regio... | true |
339902f82e7cc38e41f75b4b6ee64e204e73aab5 | SQL | shawnw/adventofcode | /2019/day01.sql | UTF-8 | 281 | 3.578125 | 4 | [] | no_license | -- CREATE TABLE modules(mass INTEGER);
-- .import input.txt modules
-- Part 1
SELECT sum(mass/3 - 2) FROM modules;
-- Part 2
WITH fuels AS
(SELECT mass / 3 - 2 as fuel FROM modules
UNION ALL
SELECT fuel / 3 - 2 FROM fuels WHERE fuel / 3 - 2 > 0)
SELECT sum(fuel) FROM fuels;
| true |
0c734b2d22fce6759318ba608efb307d2397dba0 | SQL | cckmit/pnlb | /db/maintain/Maintenance/0_TempTable_Drop.sql | UTF-8 | 1,782 | 3.390625 | 3 | [] | no_license | /*************************************************************************
* The contents of this file are subject to the Compiere License. You may
* obtain a copy of the License at http://www.compiere.org/license.html
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
* express or impl... | true |
a8520ecc6a700069154386167b5d78251d9d8d6b | SQL | ssaha22/student-calendar | /server/db/schema.sql | UTF-8 | 2,240 | 3.609375 | 4 | [] | no_license | CREATE TABLE users (
id SERIAL PRIMARY KEY,
email TEXT NOT NULL UNIQUE,
password TEXT NOT NULL
);
CREATE TABLE courses (
id SERIAL PRIMARY KEY,
user_id INTEGER NOT NULL,
name TEXT NOT NULL,
section TEXT,
start_date DATE,
end_date DATE,
FOREIGN KEY (user_id) REFERENCES users ON D... | true |
ea80b7d8574d1672e210876fb5766830e3a9ffa0 | SQL | songchunhua/smartfactory | /src/main/java/com/mesplus/MBI/dao/scheme/query-schema.sql | UTF-8 | 775 | 2.9375 | 3 | [] | no_license | -- Query Schema
drop table queries if exists cascade;
create table queries(
factory varchar(50) not null,
queryid varchar(50) not null,
statement varchar(50) not null,
commandtype varchar(50) not null,
description varchar(256),
commandtimeout number(4) not null,
commandtext varchar(4000) not null);
create unique... | true |
e6201c4879efaeb0f5a24935a891264c9f159722 | SQL | boruitao/Group03 | /Desktop/TAMAS.sql | UTF-8 | 6,472 | 2.9375 | 3 | [] | no_license | -- PLEASE DO NOT EDIT THIS CODE
-- This code was generated using the UMPLE 1.25.0-9e8af9e modeling language!
CREATE DATABASE IF NOT EXISTS `ca_.mcgill_.ecse_321_.tamas`;
USE `ca_.mcgill_.ecse_321_.tamas`;
CREATE TABLE IF NOT EXISTS `ca_.mcgill_.ecse_321_.tamas`.`management_system`
(
/*------------------------*/
/... | true |
d48dd0603e613db4264d6cc3a4441a9f0e336bce | SQL | felipesdias/Extractor-URI-Online-Judge | /URI-ES/SQL/2607 - Providers' City in Alphab....sql | UTF-8 | 219 | 2.609375 | 3 | [] | no_license | -- Autor: Felipe Souza Dias <felipe.s.dias@outlook.com>
-- Nome: Providers' City in Alphab...
-- Nível: %d
-- Categoria: SQL
-- URL: https://www.urionlinejudge.com.br/judge/es/problems/view/2607
select distinct city from providers order by city
| true |
5b3141321f0ff2aa61781b92bcbdfb4cc373dd56 | SQL | Montanasdelpablo/Sleeptight-Server | /sleeptight.sql | UTF-8 | 1,647 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Gegenereerd op: 29 mrt 2017 om 13:09
-- Serverversie: 10.1.10-MariaDB
-- PHP-versie: 7.0.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
4f667df2d3c90ddcd3adfa4b761a7b0733a5e174 | SQL | 19020440/ooad-group-13 | /dâtbase/web_maytinh_comments.sql | UTF-8 | 2,499 | 3.078125 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: web_maytinh
-- ------------------------------------------------------
-- Server version 8.0.23
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;... | true |
6866cd96986dd3a66bf2794071874605506ea47e | SQL | SoftTree-Technologies/sa-test | /sa-test/PG_Test/postgres/Tables/pg_catalog.pg_auth_members.sql | UTF-8 | 966 | 2.953125 | 3 | [] | no_license | SET SCHEMA "pg_catalog";
CREATE TABLE pg_auth_members (
roleid oid NOT NULL,
member oid NOT NULL,
grantor oid NOT NULL,
admin_option boolean NOT NULL
);
ALTER TABLE ONLY pg_auth_members REPLICA IDENTITY NOTHING;
ALTER TABLE pg_auth_members OWNER TO postgres;
--
-- Name: pg_auth_members_member_role_... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.