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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
da93a1330a6cba25c59bdd2a30a0614197bf7b01 | SQL | delao27/FinalProjectREPO_GroupF4 | /DDL Files/sim.ddl.sql | UTF-8 | 5,653 | 3.25 | 3 | [] | no_license | -- Generated by Oracle SQL Developer Data Modeler 4.1.3.901
-- at: 2016-03-29 20:11:44 CDT
-- site: Oracle Database 11g
-- type: Oracle Database 11g
drop table S16_PROJECT cascade constraints;
drop table S16_PERSON cascade constraints; ... | true |
a6497d4eb3a6af0edff9c1c3461e6ec2ff4ea70a | SQL | PatyTheImp/GestaoDeProjetos | /TabelaConsultarColaborador.sql | UTF-8 | 194 | 3.265625 | 3 | [] | no_license | SELECT t.nome, t.area, t.custo
FROM TecnologiaColaborador AS tc
JOIN Colaborador AS c
ON c.nif = tc.colaborador_nif
JOIN Tecnologia AS t
ON t.id = tc.tecnologia_id
WHERE c.nif = 123456789; | true |
303c6e7b594d67b9c9cbf738854e19c257967a86 | SQL | altinukshini/filterdb_samples | /user_profile.sql | UTF-8 | 2,341 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.6deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 24, 2013 at 07:28 AM
-- Server version: 5.5.32-0ubuntu7
-- PHP Version: 5.5.3-1ubuntu2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
b65f44a1c0010a2358f1c59d62781d9a8465a9bc | SQL | FabianArancibiaM/bkp-todo | /DataBase/view-asf-postgres.sql | UTF-8 | 1,117 | 3.546875 | 4 | [] | no_license | create view searchcriteria(transactionId,datecreated,transactionstate,createdbyuserid,chileanrut,decision) as
SELECT ig.transactionid,
t.datecreated,
COALESCE(t.status, ' '::character varying) AS transactionstate,
COALESCE(t.usuario, ' '::character varying) ... | true |
4a8da5e73a67fa90fb51d681fe5e4101486dff52 | SQL | vgorin/trainhack4 | /sql/useful-scripts-DML.sql | UTF-8 | 3,659 | 4.46875 | 4 | [
"MIT"
] | permissive | -- unique different routes affected by the incident
SELECT DISTINCT d.`Start Stanox`, s1.`NR ROUTE`, d.`End Stanox`, s2.`NR ROUTE` FROM delays d
LEFT JOIN stanox_codes s1 on d.`Start Stanox`=s1.`STANOX NO.`
LEFT JOIN stanox_codes s2 on d.`End Stanox` = s2.`STANOX NO.`
WHERE s1.`NR ROUTE` <> s2.`NR ROUTE`;
-- top 50 in... | true |
2b1584ee0cb65583e7468280a1c587f58ac86f95 | SQL | Kyledmw/student-projects | /microservices/appliance-maintenance-management/microservices/property-manager-service/src/main/resources/data.sql | UTF-8 | 263 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | INSERT INTO property_managers(account_id) SELECT 1 WHERE NOT EXISTS(SELECT 1 FROM property_managers WHERE account_id=1)
INSERT INTO current_property_ids(manager_id, property_id) SELECT 1, 1 WHERE NOT EXISTS(SELECT 1 FROM current_property_ids WHERE property_id=1) | true |
c7eea8e2f821a0a97f754313fda7bd53343091f5 | SQL | Alex-Cruz6/guiasLis | /guia10/ejercicio2/db/users.sql | UTF-8 | 2,150 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-04-2021 a las 07:00:40
-- Versión del servidor: 10.4.18-MariaDB
-- Versión de PHP: 8.0.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_... | true |
47306f12b65a5b0a25342dff7750f8ec168a0c9a | SQL | tralljf/docker-python | /.docker/mysql/init.sql | UTF-8 | 332 | 2.546875 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS crypto;
use crypto;
CREATE TABLE IF NOT EXISTS PRICES (
sell_rate decimal(14,2),
buy_rate decimal(14,2),
sell_book varchar (100),
buy_book varchar (200),
exchange varchar (200),
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
update_at DATETIME DEFAULT CURRENT_T... | true |
6733e3fd47fa5d1d4d7a86a5caf0533c96ce480e | SQL | miths1108/PiGen | /codd-data-gen/resources/cdgclient/postgres/projection queries/workloads/w3/q021.sql | UTF-8 | 433 | 2.90625 | 3 | [] | no_license | -- start query 24 in stream 0 using template query62.tpl
select distinct w_warehouse_name, sm_type, web_name
from
web_sales
,warehouse
,ship_mode
,web_site
,date_dim
where
d_month_seq between 1212 and 1212 + 11
and ws_ship_date_sk = d_date_sk
and ws_warehouse_sk = w_warehouse_sk
and ws_ship_mode_sk ... | true |
9af3527c74e3a6a6d9ab9c579448a138debca702 | SQL | KamilPchelka/QuestStore | /src/main/java/RefreshDBQuery.sql | UTF-8 | 5,579 | 3.921875 | 4 | [] | no_license | DROP TABLE IF EXISTS artifact_associations;
DROP TABLE IF EXISTS artifact_store;
DROP TABLE IF EXISTS group_names;
DROP TABLE IF EXISTS predefined_levels;
DROP TABLE IF EXISTS quest_associations;
DROP TABLE IF EXISTS quest_store;
DROP TABLE IF EXISTS user_artifacts;
DROP TABLE IF EXISTS user_associations;
DROP TABLE IF... | true |
e03b1831c29610ed57b69d8fd319d6b06ff4f2f1 | SQL | ivfatut24/Rental_8 | /database/ta_rental v1.0.sql | UTF-8 | 4,450 | 3.171875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 06, 2020 at 04:11 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
e2af32540cb28613b983bd7144dd69fbb779490d | SQL | practicum/poq | /sample_databases/camping/sample_query_member_data.sql | UTF-8 | 5,514 | 3.828125 | 4 | [] | no_license |
-- NOTE: this concept of 'pseudonull_date' was introduced because the
-- application code could not handle 'zero dates' that the DBMS does
-- handle (the ones that look like this in mysql: '0000-00-00 00:00:00'
select '1970-01-01' into @pseudonull_date;
select '1970-06-01' into @minimum_date;
select '2200-01-01' into ... | true |
e6183dbbd953e3b7e61b67f62c6a90283383c33f | SQL | opengovsg/GoGovSG | /src/server/db_migrations/20220929_add_source_column.sql | UTF-8 | 343 | 2.796875 | 3 | [
"MIT"
] | permissive | BEGIN TRANSACTION;
CREATE TYPE enum_urls_source AS ENUM ('BULK', 'API', 'CONSOLE');
ALTER TABLE urls ADD "source" enum_urls_source;
ALTER TABLE url_histories ADD "source" enum_urls_source;
COMMIT;
-- Down migration
-- ALTER TABLE urls DROP COLUMN "source";
-- ALTER TABLE url_histories DROP COLUMN "source";
-- DROP... | true |
b8ab9e0e05d0e8e09bc382e3dac6c941e759ac11 | SQL | JeffRhine/c-lectures | /m2-w5d2-aggregate-functions-lecture/lecture.sql | UTF-8 | 1,562 | 3.90625 | 4 | [] | no_license | -- ORDERING RESULTS
-- Populations of all countries in descending order
--Names of countries and continents in ascending order
-- LIMITING RESULTS
-- The name and average life expectancy of the countries with the 10 highest life expectancies.
-- SQL
-- CONCATENATING OUTPUTS
-- The name & state of all citi... | true |
5d89ad3d73a328452cd4d429a7c4bb53ceaea6d1 | SQL | fabiohbarbosa/ci | /src/main/resources/scripts/db.changelog-01.sql | UTF-8 | 478 | 2.734375 | 3 | [] | no_license | --liquibase formatted sql
--changeset fabio.barbosa:01.01
CREATE TABLE user
(
id int NOT NULL AUTO_INCREMENT,
name varchar(255),
PRIMARY KEY (id)
);
--rollback drop table user
--changeset fabio.barbosa:01.02
INSERT INTO user (name) VALUES ('Usuário 1');
INSERT INTO user (name) VALUES ('Usuário 2');
INSERT INTO u... | true |
d5e409448879627324b6af1648dadd747a8fdc1b | SQL | Donny2333/notes | /面试题/3.5/php_manaul.sql | UTF-8 | 336 | 2.5625 | 3 | [] | no_license |
CREATE DATABASE IF NOT EXISTS phpmanual DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS `php_index`;
CREATE TABLE `php_index` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`link` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT ... | true |
39c7a5aee0830bd19f99dec57cec37b8f111f55e | SQL | wassupwolves/CMSProject | /cmsdatabase.sql | UTF-8 | 3,894 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 10, 2018 at 03:55 AM
-- Server version: 5.7.21
-- PHP Version: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
ee3672d3c48ddf6f15f146b55ca40123c511b246 | SQL | aasthakumar/FitnessFreak | /SQL/Index/idx_user_emailaddress.sql | UTF-8 | 358 | 2.578125 | 3 | [] | no_license | Use FitnessFreak;
-- =============================================
-- Author: Aastha Kumar
-- Create date: Dec, 3, 2017
-- Description: Creating index on Email Address column, user table as that column is frequently used for query
-- Version: 0.1
-- =============================================
CREATE INDEX i... | true |
e8d3fa145b85db04a50071a968fb8fbdbca70b48 | SQL | biocodellc/geome-configurations | /scripts/update_project_owner.sql | UTF-8 | 399 | 3.3125 | 3 | [] | no_license | -- Example script for changing project owner
--verify current project id, title, and owner
--select projects.id,projects.project_title,users.username,users.id from projects,users
--where projects.user_id = users.id and projects.id = 282;
-- get user_id for new user
--select id,username from users where username like... | true |
53e960f3cbde75c771120d3f10e1b2999aafc0d4 | SQL | marcosvppfernandes/exploring_sql | /sql_files/example_joins.sql | UTF-8 | 671 | 3.59375 | 4 | [] | no_license | /*
Author: Karen Warmbein
Date: May 26, 2020
Purpose: Using joins to create a new view
Note: results are omnivors
*/
-- Inner join
SELECT *
FROM circ_consts AS c
INNER JOIN sum_consts AS s
ON c.const_name = s.const_name;
-- Outer join
SELECT *
FROM circ_consts AS c
FULL... | true |
8f6e2c6922562e0d09e7a3356ec782a4427a48f4 | SQL | ArtyomTrefilov/bystrobankSqlTestApp | /selectTables.sql | UTF-8 | 3,856 | 4.5 | 4 | [] | no_license | /*
* 1. Выдать список названий всех книг в алфавитном порядке, стоимость которых строго меньше 100000
*/
SELECT name
FROM books
WHERE cost < 100000
ORDER BY name
/*
* 2. Список имён ныне живущих авторов и количество их книг – детективов. (Название в таблице стилей - «Детективы»).
* Сортировать по количес... | true |
0e2afde9466e1420116a03d3aa00378681f23a6c | SQL | SteelBIM/fxtcode | /FxtCenterService/tags/InHomeForCaseInStore/FxtCenterService.DataAccess/SQL/Project/BuildingDetailInfoList.sql | UTF-8 | 3,040 | 3.21875 | 3 | [] | no_license | select b.*
from
--楼栋
(
select FxtCompanyid,ProjectId, BuildingId, BuildingName, PurposeCode, StructureCode, BuildingTypeCode, TotalFloor, FloorHigh, SaleLicence, ElevatorRate, UnitsNumber,
TotalNumber, TotalBuildArea, BuildDate, SaleDate, AveragePrice, AverageFloor, JoinDate, LicenceDate, Oth... | true |
fa9e9bc331997d31235d44e8feced333045314f5 | SQL | InfoClinika/chorus-opensource | /chorus/model-impl/src/main/resources/views.sql | UTF-8 | 2,655 | 4.21875 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | drop table if exists experiment_dashboard_record;
CREATE OR REPLACE VIEW experiment_dashboard_record AS
SELECT
e.id as id,
e.name,
e.description,
e.lab_id as lab_id,
e.bill_laboratory as bill_lab_id,
e.project_id,
e.creator_id,
count(rf.id) as numberOfFiles,
0 as analyzesCount,
e.lastModification,
e.downloadToken,
e.e... | true |
27d08020d0fdda42d0f1eeb07775376edbd29472 | SQL | Abubakar101/TTP-Calender | /CalendarBackEnd/db/migrations/migration.sql | UTF-8 | 189 | 2.515625 | 3 | [] | no_license | \c calendar_dev
drop table if exists events;
CREATE TABLE events (
id BIGSERIAL PRIMARY KEY,
start_time VARCHAR(255),
end_time VARCHAR(255),
description TEXT,
day_id INTEGER
);
| true |
f483ada54310c28e1efbc8ba5c569b8447faeb65 | SQL | sfalvarez/CodeHubTaller8 | /Consulta4.sql | UTF-8 | 143 | 2.640625 | 3 | [] | no_license | /* 4. */
SELECT e.employee_id, e.last_name, e.manager_id, m.last_name
FROM employees e
INNER JOIN employees m ON e.manager_id = m.employee_id; | true |
4f8abcad6adfd5b0f8d7ce1e67c512588d8eece1 | SQL | brandonvilla21/examen-backend | /db/query.sql | UTF-8 | 615 | 3.3125 | 3 | [] | no_license | CREATE DATABASE control_escolar;
CREATE TABLE control_escolar.professor(
id_professor INT NOT NULL AUTO_INCREMENT,
name VARCHAR (50),
lastname_p VARCHAR(50),
lastname_m VARCHAR(50),
teaching VARCHAR(60),
PRIMARY KEY (id_professor)
);
CREATE TABLE control_escolar.student(
no_control INT NOT NULL AUTO_INCREMENT,
id_car... | true |
98fb5733a4d01eead9e9406db9910487c34e8cf1 | SQL | dvornikov/dubai | /2.sql | UTF-8 | 4,010 | 3.578125 | 4 | [] | no_license | DROP TABLE IF EXISTS `products`;
CREATE TABLE `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(500) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `products` (`name`) SELECT CONCAT('product_', @row := @row + 1) FROM
(select 0 union all select 1 union all select 2 u... | true |
f8c73fb1a0886185eb73a97240bb514bfec99f4f | SQL | nestorPons/TPVON | /apptpv/db/app_tpv.sql | UTF-8 | 11,256 | 3.3125 | 3 | [
"MIT"
] | permissive | DROP TABLE IF EXISTS `articulos`;
CREATE TABLE `articulos` (
`id` int(11) UNSIGNED NOT NULL,
`codigo` varchar(10) COLLATE utf8_spanish2_ci NOT NULL,
`nombre` varchar(30) COLLATE utf8_spanish2_ci DEFAULT NULL,
`descripcion` varchar(100) COLLATE utf8_spanish2_ci DEFAULT NULL,
`precio` float NOT NULL,
`tiempo... | true |
c201633403fc7a958e51e20551e3b5629ca57b63 | SQL | vijaydairyf/TimelyFish | /SolomonApp/dbo/Stored Procedures/dbo.DMG_PurchOrd_CpnyID_All.sql | UTF-8 | 257 | 2.515625 | 3 | [] | no_license | create procedure DMG_PurchOrd_CpnyID_All
@CpnyID varchar(10),
@PONbr varchar(10)
AS
select *
from PurchOrd
where CpnyID = @CpnyID
and PONbr LIKE @PONbr
order by PONbr
-- Copyright 1998 by Advanced Distribution Group, Ltd. All rights reserved.
| true |
6d5b29a3fef679611e3afe56a94287ee624d7f9f | SQL | Boulloul/Oracle | /TP1.sql | UTF-8 | 2,249 | 3.734375 | 4 | [] | no_license | Question 4-a
select*
from employees;
Question 4-b
select last_name,first_name,salary
from employees;
Question 4-c
select last_name,first_name,salary
from employees
where salary>20000;
Question 4-d
select last_name,first_name,salary
from employees
where salary between 6000 and 20000;
Question 4-e
select last_n... | true |
4fd80978a5d29c026c441175fa75944cea00ea67 | SQL | 1suming/CenturyServer | /sql/source/room.sql | UTF-8 | 546 | 2.890625 | 3 | [] | no_license | -- 游戏房间 --
CREATE TABLE `room`(
`gameuid` int(10) default "0" COMMENT '创建人gameuid',
`name` varchar(10) default "" COMMENT '简短描述',
`type` int(10) default "0" COMMENT '所在房间ID',
`maxcount` int(10) default "0" COMMENT '最大人数',
`nowcount` int(10) default "0" COMMENT '当前人数',
`des` varchar(200) default "" COMMENT '房间描述',
`... | true |
cb0b949a591cad5b530df83a02afa45397a2aad3 | SQL | swithun/IslamAnatolia | /db/schema.sql | UTF-8 | 2,069 | 4 | 4 | [
"Apache-2.0"
] | permissive | -- -*- mysql -*-
/****** dbscripts/schema.sql
* NAME
* schema.sql
* SYNOPSIS
* The schema for defining the tables and indexes for the anatolia database.
* AUTHOR
* Swithun Crowe
* CREATION DATE
* 20120710
******
*/
DROP DATABASE IF EXISTS arts_anatolia_fs;
CREATE DATABASE arts_anatolia_fs;
USE arts_anatolia... | true |
ef693f81bb54a4480186953c348c8f42edf6dada | SQL | abubanggheed/Pet-Hotel-Challenge | /database.sql | UTF-8 | 428 | 3.28125 | 3 | [] | no_license | CREATE TABLE "owner" (
"id" SERIAL PRIMARY KEY,
"name" VARCHAR (50)
);
CREATE TABLE "pet" (
"id" SERIAL PRIMARY KEY,
"name" VARCHAR (50) NOT NULL,
"breed" VARCHAR (50),
"color" VARCHAR (25),
"checked_in" BOOLEAN,
"last_checkin" DATE,
"owner_id" INT REFERENCES "owner"
);
CREATE TABLE "history" (
"id" SERIAL P... | true |
cfca8214dd26336df0e5b554bd8454b6367fa154 | SQL | hhhai/baby | /sql/Baby_user.sql | UTF-8 | 1,450 | 3.453125 | 3 | [
"Apache-2.0"
] | permissive | #1设置客户端连接服务器端的编码
SET NAMES UTF8;
#2丢弃数据库Baby_sql,如果存在的话
DROP DATABASE IF EXISTS Baby;
#3创建数据库xz,设置存储的编码为UTF8
CREATE DATABASE Baby CHARSET=UTF8;
#进入Baby数据库
USE Baby;
#创建保存用户数据的表Baby_user
CREATE TABLE Baby_user(
uid INT, #编号
uname VARCHAR(16), #用户名
upwd VARCHAR(32), # 000000 -> 0 密码
email V... | true |
332392819d82887468c9d601af30d7b59cf93691 | SQL | Arnebius/gugik2osm | /processing/sql/ddl/bdot_buildings_osm_tags_mapping.sql | UTF-8 | 468 | 3.3125 | 3 | [
"MIT"
] | permissive | drop table if exists bdot.buildings_categories_mappings;
create table if not exists bdot.buildings_categories_mappings (
kategoria_bdot text not null,
funkcja_ogolna_budynku text not null,
funkcja_szczegolowa_budynku text not null,
building text,
amenity text,
man_made text,
leisure text,
historic text,... | true |
a0946b69a37771c837f8940c2593aba236172755 | SQL | Eccenux/panel-helper | /.sql/_addon_TABLE.search_profile.sql | WINDOWS-1250 | 1,209 | 3.734375 | 4 | [
"MIT",
"CC-BY-4.0"
] | permissive | --
-- Profil wyszukiwawczy (na podstawie tabeli z Polosa).
--
--DROP TABLE IF EXISTS `search_profile`;
CREATE TABLE IF NOT EXISTS `search_profile` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`dt_create` datetime DEFAULT NULL,
`dt_change` datetime DEFAULT NULL,
`group_name` varchar(20) DEFAULT NULL,
-- kr... | true |
5cd6606b813f3d46dea74d6a61222556067ada9d | SQL | claudiospro/neointel_proyecto01 | /appmodules/sql/fuente/fuente.tables.campania.sql | UTF-8 | 791 | 3.484375 | 3 | [] | no_license | DROP TABLE IF EXISTS fuente_campania;
CREATE TABLE fuente_campania(
info_create TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
info_create_user INT DEFAULT 1,
info_update TIMESTAMP,
info_update_user INT,
info_status TINYINT(1) DEFAULT 1,
--
id BIGINT NOT NULL AUTO_INCREMENT,
nombre VARCHAR(300) NOT NULL,
--
PRIM... | true |
b16eb1002ff2cb391c3e90317c92ec63286f6225 | SQL | mascitra-com/e-kelurahan | /sql/surat_ktm_sekolah.sql | UTF-8 | 2,649 | 3.203125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.6.6
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 23, 2017 at 07:31 AM
-- Server version: 10.2.3-MariaDB-log
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... | true |
6c5d47d266933808d5673049a2c48b3b9d554511 | SQL | kyujinjeong813/Python_Core | /sql2.sql | UTF-8 | 1,269 | 3.671875 | 4 | [] | no_license | INSERT INTO goods values(1,"냉장고", 2, 850000);
INSERT INTO goods VALUES(2,"세탁기", 3, 550000);
INSERT INTO goods VALUES(3,"전자레인지", 2, 350000);
INSERT INTO goods VALUES(4,"HDTV", 3, 1500000);
# name = not null
#INSERT INTO goods(CODE, su, dan) VALUES(4,3, 1500000);
# primary key = code (기본값이 0이라서 하나는 들어가고, 그담부터 안들어감)
#INS... | true |
19aae583ecec773bb46417dce868bba646c41f37 | SQL | magic-IOS/leetcode-swift | /0185. Department Top Three Salaries.sql | UTF-8 | 2,826 | 4.90625 | 5 | [
"Apache-2.0"
] | permissive | -- 185. Department Top Three Salaries
-- Table: Employee
-- +--------------+---------+
-- | Column Name | Type |
-- +--------------+---------+
-- | Id | int |
-- | Name | varchar |
-- | Salary | int |
-- | DepartmentId | int |
-- +--------------+---------+
-- Id is the primary k... | true |
ece0bca06e4ccbca2442955ce4e1b9ecf9663564 | SQL | Frillion/Databases-Late-2019 | /Json_test/Databases/MySQL_JSon/WebShop_Database_V2.sql | UTF-8 | 1,175 | 3.78125 | 4 | [] | no_license | drop database if exists WebShop_V2;
create database WebShop_V2
default character set utf8
default collate utf8_general_ci;
use WebShop_V2;
-- Byggt á sýnidæmi frá Norman Ur Rehman
-- https://scotch.io/tutorials/working-with-json-in-mysql
-- Opnað 03.10.2018
create table Brands
(
ID int auto_increment,
bran... | true |
d84733a032b102a8e58c4cd0a327f1443ea54442 | SQL | hwans21/DataBase | /Day02/문자열함수.sql | UHC | 1,370 | 3.859375 | 4 | [] | no_license |
/*
Dual ̺
- Ŭ ü Ǵ Ʈ ̺
- ϰ Լ ̿ؼ Ȯ ϴ ̺
- Dual ̺ dummy ÷ ϸ, ش ÷ ǹ̾ ÷̰
Լ , ÷̸ ؼ Ȯ ִ.
*/
SELECT * FROM dual;
-- lower(ҹ), initcap(ձڸ 빮), upper(빮)
SELECT 'abcDEF', lower('abcDEF'), upper('abcDEF')
FROM dual;
SELECT
last_name, lower(last_name), initcap(last_name), upper(last_name)
FROM employees;
SELECT last_na... | true |
a05cce32419a5663de7896cb4bd6b0cea5405f8f | SQL | Anand-GitH/Tinyhub | /Tinyhub.sql | UTF-8 | 8,150 | 3.4375 | 3 | [] | no_license | -- Database Created for CSE 4/560 Project1: TinyHub
-- Team Members
-- Anand
-- Jing Chen
-- Rahul Patil
-- Date Created : 11-07-2020
-- Date Modified : 11-29-2020
DROP DATABASE IF EXISTS tinyhub;
CREATE DATABASE IF NOT EXISTS tinyhub;
USE tinyhub;
SELECT 'Database TinyHub is Created' as 'INFO';
DROP TABLE... | true |
5f052d6d12f3a1344f341a36860dee0012b040f4 | SQL | martinez022jose/Consultas-SQL | /ejercicio_003.sql | UTF-8 | 2,764 | 3.984375 | 4 | [] | no_license | CREATE DATABASE db;
CREATE TABLE usuarios(
id INT NOT NULL,
usuario VARCHAR(20) NOT NULL,
nombre VARCHAR(20) NOT NULL,
sexo VARCHAR(1) NOT NULL,
nivel INT NOT NULL,
email VARCHAR(50) NOT NULL,
telefono VARCHAR(20) NOT NULL,
marca VARCHAR(20) NOT NULL,
compañia VARCHAR(20) NOT NULL,
saldo ... | true |
7d9887f71bff0fa8fe880cddda77e7f7d17c5d1d | SQL | severeone/oidc-server | /db/oidc/migrations/20190128000000_initial_schema.sql | UTF-8 | 1,824 | 3.84375 | 4 | [] | no_license | -- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
-- User account types
CREATE TABLE user_account_types (
type SERIAL PRIMARY KEY,
description TEXT
);
-- Registered users
CREATE TABLE users (
id SERIAL PRIMARY KEY,
type INTEGER NOT NULL REFER... | true |
4ddd8f10228db0ba7dd9f4f5f6d1145db61747b6 | SQL | mingzhanghui/graph | /sql/content.sql | UTF-8 | 2,789 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL dump 10.16 Distrib 10.1.10-MariaDB, for osx10.6 (i386)
--
-- Host: localhost Database: knowledgegraph
-- ------------------------------------------------------
-- Server version 10.1.10-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHAR... | true |
cc22b6ca1873a24a634212520e57301a0cfd1499 | SQL | yuras007/guestbook | /guestbook.sql | UTF-8 | 13,681 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Хост: 127.0.0.1
-- Время создания: Май 28 2013 г., 08:08
-- Версия сервера: 5.5.25
-- Версия PHP: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... | true |
d9689d6503e66d109e8548a7cd00ca63b7333c20 | SQL | sergiojaviermoyano/docesoles | /database/docesoles_24_08_15.sql | UTF-8 | 10,749 | 3 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : local
Source Server Version : 50520
Source Host : localhost:3306
Source Database : docesoles
Target Server Type : MYSQL
Target Server Version : 50520
File Encoding : 65001
Date: 2015-08-24 18:22:13
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
e31f868bc9dfa96aeccc4d5164e9f9dbe53f0bf2 | SQL | Pholenk/news-portal | /database/magang.sql | UTF-8 | 14,045 | 3.140625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 19 Okt 2016 pada 06.47
-- Versi Server: 10.1.9-MariaDB
-- PHP Version: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
04a2f43116da047884e0c4d0da778cb707937eb5 | SQL | alv1234/technikum-sql | /UE4.sql | UTF-8 | 1,957 | 3.890625 | 4 | [] | no_license | set serveroutput on;
-- 1.) Schreiben Sie eine PL/SQL Prozedur mit einem Parameter (ganze Zahl v_i)
-- und mit einem Select-Statement Ihrer Wahl. Aufgabe der Prozedur ist es,
-- jeden v_i-ten Datensatz des Ergebnisse auszuschreiben. Verwenden Sie aber
-- keine rownum (wie in der ersten ‹bung), sondern einen Cursor.
cr... | true |
7f8cfc874bb90c82f13cbf8109990c3308d53f62 | SQL | jacob-l-g/Supermarket-Layout-Database-Design | /ReportQueries.sql | UTF-8 | 1,536 | 4.1875 | 4 | [] | no_license | -- REPORT 1
select p.CashierType, avg(datediff(second, p.StartTime, p.EndTime)) as AvgTime
from Purchase p
join Basket b on p.PurchaseID = b.PurchaseID
join ItemsPerPurchase i on i.PurchaseID = p.PurchaseID
where i.TotalQuantity >= 10
group by p.CashierType
-- REPORT 2
select s.Aisle, count(s.Aisle) as Occure... | true |
b069543ddb0c3c3194396a9a6733255b4526c80c | SQL | maxpetr72/pa-pps | /osnastka/sql/pa-papps_osn-tbls_00.sql | UTF-8 | 8,887 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Авг 30 2018 г., 12:29
-- Версия сервера: 5.6.38
-- Версия PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
ee1a81e8ac93e22cd64fffdeb580d13ee9de8423 | SQL | LaiFany/PixAlbums4U | /PixAlbums4U/app.sql | UTF-8 | 3,806 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 20, 2015 at 02:40 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
1f3eeb93efc7eac2862cbdbfcf7c9949bcfa71a5 | SQL | juanmaberrocal/game-scoreboard | /db/structure.sql | UTF-8 | 15,902 | 3.1875 | 3 | [] | no_license | SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row... | true |
8e59fa9f843ab8af4025be1aca79ba595187ec06 | SQL | Bombdude/karaoke | /db/pp-songlist.sql | UTF-8 | 508 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | CREATE DATABASE `pp-songlist`;
CREATE USER 'pp_ui_user'@'%' IDENTIFIED BY '';
GRANT ALL ON `pp-songlist`.* TO 'pp_ui_user'@'%';
--CREATE USER 'pp_ui_user'@'localhost' IDENTIFIED BY 'l1f3s a l0ng s0ng';
FLUSH PRIVILEGES;
USE pp-songlist;
DROP TABLE IF EXISTS songlist;
CREATE TABLE songlist (
id INT(11) NOT N... | true |
27d4601ae2d3638a74a78323475a9100ac3ce6fd | SQL | bid-wars/bid-wars | /db/bids/get_bids.sql | UTF-8 | 216 | 3.40625 | 3 | [] | no_license | SELECT bi.*, us.firstname, us.lastname, us.email, ph.number
FROM bids bi
JOIN companies co
ON bi.company_id = co.id
JOIN users us
ON us.company_id = co.id
JOIN phones ph
ON us.id = ph.external_id
WHERE us.id = ${id}; | true |
3699292b0daade9d204afe1426f390c99cd79d45 | SQL | smcampion/datasci_course_materials | /assignment2/P1A.sql | UTF-8 | 87 | 2.734375 | 3 | [] | no_license | select count(*) from (
select docid,
from frequency
where docid = "10398_txt_earn"
) | true |
f1fdd307ff3a1f1ca5db64e0e26e5ab5876f7105 | SQL | jdanielricher/sql-2-afternoon | /SQL/group1.sql | UTF-8 | 92 | 3.078125 | 3 | [] | no_license | SELECT Count(*), g.Name
FROM Track t
JOIN Genre g ON t.GenreId = g.GenreId
Group BY g.Name; | true |
c03ab71f180de8b89f1e1bb83cae68bd622443bd | SQL | AlexanderGubskiy/TaskForMediaLine | /JsAndPhp/back/dump/rbc.sql | UTF-8 | 11,295 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 10 2019 г., 01:26
-- Версия сервера: 8.0.15
-- Версия PHP: 7.1.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
48f4d6d6a2b8e4bdd3c36dbd92efc40eaa970c7d | SQL | arsiac/psychology | /design/psychology_user_centre.sql | UTF-8 | 10,482 | 3.6875 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : Aliyun(47.110.247.139)
Source Server Type : MySQL
Source Server Version : 50732
Source Host : 47.110.247.139:3306
Source Schema : psychology_user_centre
Target Server Type : MySQL
Target Server Version : 50732
File Encoding ... | true |
2dc40598319b3d581ec83f24e41d4b893826da4a | SQL | berrynadia1/MySQL-Week1 | /Week 1 MySQL.sql | UTF-8 | 592 | 3.28125 | 3 | [] | no_license | USE cars;
CREATE TABLE movies(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
title VARCHAR (255),
release_date INT,
rating INT
);
INSERT INTO movies(title, release_date, rating)
VALUES
('Unhinged', 2020, 6),
('Gone Girl', 2014, 8),
('Prisoners', 2013, 8),
('Law Abiding Citizen', 2009, 7),
('John Wick', 2014, 7),
('Blac... | true |
9fc8db00c4799438d4e1854c6797685ce4903dfb | SQL | sdnrzls/sdnrzls-SQL-First | /day-02/07_NULL 함수.sql | UHC | 2,281 | 4.21875 | 4 | [] | no_license | -- NULL Լ
-- NVL : ΰ ٸ ٲܶ
SELECT last_name, manager_id, NVL(manager_id,0) Ŵ
FROM employees
WHERE last_name = 'King';
-- NVL2(ex,ex1,ex2) :
-- ex NULL ƴϸ ex1 NULL̸ ex2
SELECT last_name, NVL2(manager_id,1,0)Ŵ
FROM employees
WHERE last_name = 'King';
-- NULLIF(ex1,ex2): ex1 ex2 ϸ NULL
-- ex1
SELECT NULLIF(1,1),N... | true |
13a66b046399722df577cfccbddee7d1f9972d95 | SQL | radtek/Database-3 | /oracle/admin/scripts/dba_tab_histograms.sql | UTF-8 | 293 | 2.671875 | 3 | [] | no_license | --dba_tab_histograms
col column_name for a30
col endpoint_actual_value for a50
set feed off
set head on
select * from dba_tab_histograms
where owner like upper ('%&owner%')
and table_name like upper ('%&table_name%')
and column_name like upper ('%&column_name%')
order by 1,2,3,5
/ | true |
9542b7563cbf7107b578b9318ace8bec3c3a97dd | SQL | ysharat/ProjectName-ForgerockOpenidm | /IDM-eval-6.5.0.3/openidm/bin/update/scripts/postgresql/create_notifications.sql | UTF-8 | 716 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | -- -----------------------------------------------------
-- Table openidm.notificationobjects
-- -----------------------------------------------------
CREATE TABLE openidm.notificationobjects (
id BIGSERIAL NOT NULL,
objecttypes_id BIGINT NOT NULL,
objectid VARCHAR(255) NOT NULL,
rev VARCHAR(38) NOT NULL,
fu... | true |
19525d0c3db7c6c8687c85f65fb162716ba34417 | SQL | deepakbhavsar43/doctor-study | /upload/master.sql | UTF-8 | 1,594 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 08, 2017 at 04:50 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_... | true |
db846e2831eceeceb49491a39d2784ad50cb6aa6 | SQL | RPL5/API | /mahasiswa.sql | UTF-8 | 6,583 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 10, 2018 at 03:50 PM
-- Server version: 5.7.21-1
-- PHP Version: 7.0.29-1+b1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT... | true |
35577103ee63efde4be58e84e1bbb63540b5d790 | SQL | PUYUP/database-schema-examples | /postgres/ruma/schema.sql | UTF-8 | 13,320 | 3.03125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 11.6
-- Dumped by pg_dump version 11.6
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', fal... | true |
5c0dbce791f339688e74da3b3caa7165a2d7fbc7 | SQL | 49257620/reboot | /work/interface_conf/sql_script/P292018JTJJ000102_PRPDENGAGE.sql | UTF-8 | 6,289 | 3.421875 | 3 | [] | no_license | /*
特别约定:
1.所有的保险责任及条款均以现代财产保险(中国)有限公司签发的正式保险合同之相应条款为准。
2.本计划的承保年龄为3(含)至70周岁(含),以保单生效时的周岁年龄为准。60周岁以上的被保险人,其涉及“意外身故、残疾保障”、“急性病身故保障”、“医疗费用保障”保险金额为上表所载金额的一半,保险费维持不变。
3.按中国保监会规定,10周岁以下的未成年人累计身故保险金额不得超过人民币20万元;10至17周岁的未成年人累计身故保险金额不得超过人民币50万元。若未成年被保险人的保险金额超过上述规定,则以上述规定的保险金额为限。航空意外死亡保险金额、重大自然灾害意外死亡保险金额不受此限。
4.全球保险方案承保区域为全球(包括中... | true |
39d00d0f7fb1acda056f8d5dd8a2895c9012ee62 | SQL | magnushs/DBMF | /DB2_final.sql | UTF-8 | 1,630 | 3.75 | 4 | [] | no_license |
CREATE TABLE M_room (
idM_room INT UNSIGNED NOT NULL,
name VARCHAR(45) NOT NULL,
status VARCHAR(5) NULL,
idAlarm INT UNSIGNED NULL,
PRIMARY KEY (idM_room)
);
CREATE TABLE Employee (
username VARCHAR(45) NOT NULL,
password VARCHAR(45),
PRIMARY KEY(username)
);
CREATE TABLE Appntmnt (
idAppntmnt INT U... | true |
ccfc90a3d5fe7bdaebd26198042eca1b6e504a6b | SQL | bellmit/washington-sgge-1-0-0 | /contabilidade/pgsi-sendsolv-test/src/com/prosperitasglobal/sendsolv/unittest/dac/mybatis/conf/deleteSecurityQuestion.sql | UTF-8 | 262 | 2.515625 | 3 | [] | no_license | --Disable the constraints
ALTER TABLE person_security_answer NOCHECK CONSTRAINT ALL
--Delete all records
DELETE FROM person_security_answer
DELETE FROM security_question
--Active the constraints
ALTER TABLE person_security_answer CHECK CONSTRAINT ALL
| true |
c394d47d0c4410906edf7450ffcbec5fff7c0b4a | SQL | tuankhac/backup_data_141 | /WEB-INF/templates/chuyenkhoans/script.sql | UTF-8 | 7,425 | 2.90625 | 3 | [] | no_license | function new_chuyenkhoans(
pmst varchar2,
pso_bl varchar2,
pso_ct varchar2,
ptien varchar2,
pthue varchar2,
ploaitien_id varchar2,
pchukyno varchar2,
pphieu_id varchar2,
phinhthuctt_id varchar2,
pnganhang_ph varchar2,
pnganhang_dvh varchar2,
pngaynhan varchar2,
pngay_tt varchar2,
pnguoi_th varchar2,
pmay... | true |
d3dd407074182ef7e2a2586b0245ac495f2ae799 | SQL | kashika/dott_data_modeling_analysis | /target/compiled/dott_data_modelling/models/example/agg_vehicle_performance_metric_weekly.sql | UTF-8 | 1,983 | 3.90625 | 4 | [] | no_license | -- Sample command to run this script -
-- dbt run --models agg_vehicle_performance_metric_weekly --vars '{"START_DATE":"2020-12-31", "END_DATE":"2021-01-31"}'
(
SELECT
MD5(concat(cast(week.week_end_date as varchar), week.city_name, week.country_name, 'WEEK')) as hash_code,
week.week_end_d... | true |
41235e03ff19a6a106fcb7d814101b690d026472 | SQL | Thor-Herman/DatabaseProsjekt | /Filmdb/FilmDBReal.sql | UTF-8 | 5,423 | 3.703125 | 4 | [] | no_license | drop tables Videotype, Selskap, Video, Film, Serie, Bruker, Musikk, Kategori,
Episode, Person, Skuespiller,
Forfatter, Regissør, SpillerI, Regisserer, SkrevetManus, HarMusikk, KommentertFilm,
VurdertFilm, KommentertEpisode, VurdertEpisode, Kategorisert;
create table Selskap(
SelskapID int not null auto_increment,... | true |
369024e49bf370443cddbd7b4aabff07b0baac7b | SQL | azavea/pfb | /bike_infra.sql | UTF-8 | 7,542 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | ----------------------------------------
-- INPUTS
-- location: neighborhood
----------------------------------------
UPDATE neighborhood_ways SET ft_bike_infra = NULL, tf_bike_infra = NULL;
----------------------
-- ft direction
----------------------
-- sharrow
UPDATE neighborhood_ways
SET ft_bike_infra = 'sha... | true |
a47fd78866581cdb84ceee28bc1517f50690440b | SQL | ahirpara2000/IS2018-Final_Project | /db/init.sql | UTF-8 | 584 | 3.28125 | 3 | [] | no_license | CREATE DATABASE favoritesData;
use favoritesData;
CREATE TABLE userData (
`user_id` VARCHAR(30) NOT NULL,
`first_name` VARCHAR(30) NOT NULL,
`last_name` VARCHAR(30) NOT NULL,
PRIMARY KEY (`user_id`)
);
CREATE TABLE favorits (
`id` int AUTO_INCREMENT,
`user_id` VARCHAR(30),
`song_name` VARCHAR(255),
`s... | true |
77adabd1e9a9b29e6afccfb1cddbc071ce428fa9 | SQL | SergioTalko/relationDB | /sql/lesson6/product/4_ORDER_DETAILS.SQL | UTF-8 | 283 | 2.609375 | 3 | [] | no_license | CREATE TABLE ORDER_DETAILS(
ORDER_ID NUMBER,
CONSTRAINT ORDER_FK FOREIGN KEY (ORDER_ID) REFERENCES ORDERS(ORDER_ID),
PRODUCT_ID NUMBER,
CONSTRAINT PRODUCT_FK FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCTS(PRODUCT_ID),
UNIT_PRICE NUMBER,
QUANTITY NUMBER,
DISCOUNT NUMBER
) | true |
534b8d911b16f9c5918f588f73df6f324735d0d0 | SQL | wilvec/MisionTicCiclo2 | /EjemplosHPC/sql/pruebas1.sql | UTF-8 | 3,842 | 3.796875 | 4 | [] | no_license | select * from libro;
-- S e l e c c i o n a e l año m a s r e c i e n t e de p u b l i c a c i on
SELECT MAX( libPub ) FROM libro ;
-- S e l e c c i o n a e l p r e c i o promedio de l o s l i b r o s
SELECT AVG ( libPrecio ) FROM libro ;
-- Cuenta l o s l i b r o s
SELECT count(libId) from libro ;
-- S e l e c c... | true |
def69a924c2b8a6abcebe6fb87d97a23c4cb8df0 | SQL | M2i-CDA-0720-Grenoble/s17-java-jdbc-tp-Moonpearl | /database.sql | UTF-8 | 2,869 | 3.328125 | 3 | [] | no_license | -- Adminer 4.7.7 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;
DROP TABLE IF EXISTS `emoji`;
CREATE TABLE `emoji` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL,
`characters` varchar(10)... | true |
d009ce488dbc0b9e6b7da0788f066a5b284b702f | SQL | ganeshbabuNN/Databases | /RDMS/Oracle Database/Listing 25_34.sql | UTF-8 | 404 | 3.171875 | 3 | [] | no_license | create or replace procedure delstudent (studentname varchar2,ccode number) as
X courselist2;
cnt number;
i number;
begin
select course
into x from student4
where sname = studentname;
cnt := x.last;
For i in 1 .. cnt loop
if x(i).coursecode = ccode then
x(i).coursecode := null;
x(i).coursename := null;
en... | true |
39c2cc1d8682c3b582408490d76d42e728f4c06a | SQL | jinshiyi11/AppPerformanceMonitor | /src/main/resources/db.sql | UTF-8 | 1,314 | 3.5625 | 4 | [
"Apache-2.0"
] | permissive | CREATE SCHEMA `stack` DEFAULT CHARACTER SET utf8mb4;
use stack;
create user stack_user IDENTIFIED by 'test321';
grant select,update,delete ,insert,create,alter on stack.* to stack_user;
#show grants for stack_user;
#block表
CREATE TABLE IF NOT EXISTS blockInfo(
id int(10) NOT NULL AUTO_INCREMENT,
`key` varchar(128) NOT... | true |
39b9426ffb1b45bd696e4e7d98773741fb06be10 | SQL | clumsy/Civ5-MP_MODSPACK | /Mods/Nation - Lydia/Lydia_Leader_Traits.sql | UTF-8 | 1,191 | 3.5625 | 4 | [] | no_license | -- Insert SQL Rules Here
CREATE TABLE IF NOT EXISTS
Leader_SharedTraits (
LeaderType text REFERENCES Leaders(Type) default null,
TraitOne text REFERENCES Policies(Type) default null,
TraitTwo text REFERENCES Policies(Type) default null)... | true |
88c472ce891120a5296b3991ed3886e48091d0c2 | SQL | gxlioper/ecology | /data/Oracle/sql201510291301.sql | GB18030 | 4,434 | 2.828125 | 3 | [] | no_license | delete from HtmlLabelIndex where id=125288
/
delete from HtmlLabelInfo where indexid=125288
/
INSERT INTO HtmlLabelIndex values(125288,'벻һ£')
/
INSERT INTO HtmlLabelInfo VALUES(125288,'벻һ£',7)
/
INSERT INTO HtmlLabelInfo VALUES(125288,'Two password input is not consistent!',8)
/
INSERT INTO HtmlLabelInfo VALUES(12... | true |
0b052209208aaa26b8387021a237bf6514cc6bb8 | SQL | guusveen/BraboticaDatabasePlan | /BraboticaDDL.sql | UTF-8 | 2,590 | 3.59375 | 4 | [] | no_license | CREATE TABLE Rollen (
Rol VARCHAR(255) NOT NULL,
PRIMARY KEY (Rol)
);
CREATE TABLE Gebruikers (
GebruikerId INT(10) NOT NULL AUTO_INCREMENT,
Voornaam VARCHAR(255) NOT NULL,
Achternaam VARCHAR(255) NOT NULL,
Telefoonnummer VARCHAR(15),
Email VARCHAR(255) NOT NULL,
Rol VARCHAR(255) NOT NULL DEFAULT 'Klant',
Wachtwoord V... | true |
785de852c87cef0e02a06379db6d515cf1ac4c80 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day21/select0156.sql | UTF-8 | 178 | 2.640625 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-20T01:56:00Z' AND timestamp<'2017-11-21T01:56:00Z' AND temperature>=49 AND temperature<=92
| true |
93b1d6e5837bc50a4a20efb5343434beed40b1b4 | SQL | TESAARON/Primark_Repository | /Development/Code/Primark_POC_Data_Cursor_v3.sql | UTF-8 | 14,831 | 3.640625 | 4 | [] | no_license | /*
DROP TABLE IF EXISTS primark.top_25_breakdown;
CREATE TABLE primark.top_25_breakdown
(
Date CHAR(20),
Item_Style CHAR(30),
Product_Description CHAR(50),
Item_Dept_Description CHAR(30),
Section_Description CHAR(30),
price decimal(10,2),
volume int,
volume_price decimal(10,2),
avg_basket_items decim... | true |
858949b98741b4803985ee168f3e9f5ad760567b | SQL | Blendlight/notes | /database/notes.sql | UTF-8 | 2,678 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 18, 2017 at 07:30 AM
-- Server version: 5.6.26
-- PHP Version: 5.5.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... | true |
21799dfc4f9cf20f4806d8e913da7e8eb573553e | SQL | wpwen/Cosmos | /source/Cosmos.Debug.Common/SQLite.sql | UTF-8 | 3,279 | 3.59375 | 4 | [
"BSD-3-Clause"
] | permissive | -- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------
-- Creating table 'FIELD_INFO'
CREATE TABLE [FIELD_INFOS] (
[TYPE] nvarchar(512) NOT NULL,
[OFFSET] int NOT NULL,
[NAME] nvarchar(512) NOT NULL,
[ID] uniqueide... | true |
b6c8f82938db907502d1a07cdc9d77eaf0928bae | SQL | youngjinj/OPENPAAS-SERVICE-JAVA-BROKER-CUBRID | /schema.sql | UTF-8 | 1,470 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | /* cubrid createdb --db-volume-size=128M --log-volume-size=128M servicebroker ko_KR.utf8
* cubrid server start servicebroker
* csql -u dba servicebroker -c "create user cubrid password 'cubrid';"
* csql -u cubrid -p cubrid servicebroker
*
* admin:7ec40be3750ed6af68233b78dcdcee22ab018cbd359adca67275ec6f6b61406a
*... | true |
00a17c6acf17dc380ae0db35dbbc62bbacfaefbc | SQL | coderdba/oracle_OEM_queries | /listrac.sql | UTF-8 | 1,405 | 3.59375 | 4 | [] | no_license | select 'RAC PROD LISTENER',
a.AVAILABILITY_STATUS, count(*)
from mgmt$availability_current a,
mgmt$target b
where a.target_type = 'oracle_listener'
and a.target_name = b.target_name
and a.target_guid = b.target_guid
--and availability_status != 'Target Up'
and b.host_name in
(select host_name
from mgm... | true |
68f62d3180230a093387bb353b8be0a7e1209275 | SQL | Jfprado11/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/9-cities_by_state_join.sql | UTF-8 | 179 | 2.9375 | 3 | [] | no_license | -- list all cities
-- that are containing in hbtn_0d_usa.
SELECT cities.id, cities.name, states.name
FROM cities, states
WHERE cities.state_id = states.id
ORDER BY cities.id ASC;
| true |
2f6c0faeca68281a9c3a5d75042599852280f199 | SQL | jpmpassos/xy-inc | /src/main/resources/db/migration/V01__criacao_tabela_ponto.sql | UTF-8 | 935 | 3.203125 | 3 | [] | no_license | -- SQL Manager for PostgreSQL 5.4.0.42613
-- ---------------------------------------
-- Host : localhost
-- Database : db_xy_inc
-- Version : PostgreSQL 9.6.3, compiled by Visual C++ build 1800, 64-bit
SET search_path = public, pg_catalog;
DROP TABLE IF EXISTS public.ponto;
--
-- Structure for table ponto (OID... | true |
8090cd4e8ed51ce70aa708dbfd50a2b04de67525 | SQL | ReLiCRSA/LiterRCore | /db/migrations/1_user_create.sql | UTF-8 | 381 | 2.6875 | 3 | [] | no_license | CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`surname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`type` varchar(5) NOT NULL,
`password` varchar(50) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`deleted_at` ... | true |
8fe68d4142cb1eca8e7552032ee692ef97037f18 | SQL | jairosousa/osworks | /src/main/resources/db/migration/V003__cria_tabela_comentario.sql | UTF-8 | 366 | 3.140625 | 3 | [] | no_license | create table comentario
(
id bigint not null auto_increment,
ordem_servico_id bigint not null,
descricao text not null,
data_envio datetime not null,
primary key (id)
);
alter table comentario
add constraint fk_comentario_ordem_servico
foreign key (or... | true |
56e874bb3954a3a9984429f14575086ee8fdf8f3 | SQL | dtries/Project2 | /models/schema.sql | UTF-8 | 467 | 3.03125 | 3 | [] | no_license | DROP DATABASE IF EXISTS facedb;
CREATE DATABASE facedb;
-- USE facedb;
-- Create the table plans.
-- CREATE TABLE photoLibrary
-- (
-- id int NOT NULL AUTO_INCREMENT,
-- celebName VARCHAR(255) NOT NULL,
-- photoURL VARCHAR(255) NOT NULL,
-- PRIMARY KEY (id)
-- );
-- CREATE TABLE results
-- (
-- id int NOT NULL AUTO... | true |
c82739f97c3783ca58bd9ce2a7f3a38ef0d34248 | SQL | mundodron/arduino-bot-aurelio | /Querys/~ebD864.sql | UTF-8 | 242 | 2.609375 | 3 | [] | no_license | select * from gvt_product_velocity where tracking_id in (
select tracking_id from gvt_product_velocity group by tracking_id having count(1) > 1)
select prep_date, prep_status, format_status from bill_invoice where bill_ref_no=258219172;
| true |
5d62cb063e00e6247004725a225e85c61b3596f7 | SQL | sergeykirpik/psql-tutorial | /grant.sql | UTF-8 | 600 | 3.640625 | 4 | [] | no_license | -- DROP ROLE IF EXISTS joe;
-- CREATE ROLE joe
-- WITH
-- LOGIN
-- PASSWORD 'Abcd1234';
DROP TABLE IF EXISTS candidates;
CREATE TABLE candidates (
candidate_id INT GENERATED ALWAYS AS IDENTITY,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
phone VARCHA... | true |
2c073c0ad25b44cb4079becb4e70d56a352f3bdd | SQL | considine157/INFO638 | /Code Review for PHP Webpage/zcasti13_638.sql | UTF-8 | 6,905 | 3.15625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 01, 2020 at 10:59 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
3858089de994c0b2cb564090e6663b64058ec4e1 | SQL | gargeetrishra/stack | /fullstack-movie-project/db/fullstack-movie-project.sql | UTF-8 | 4,585 | 3.15625 | 3 | [] | no_license | # ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.5.38-0ubuntu0.14.04.1)
# Database: Prutor
# Generation Time: 2014-12-16 06:10:03 +0000
# *********************************... | true |
b3cac9e178ed374dde2a9e6b712e3031396a3523 | SQL | DHKim3/DBtutor_2020_2_KCOVID19 | /insert_raw_data/make_Table.sql | UTF-8 | 1,394 | 3.265625 | 3 | [] | no_license | create database K_COVID19;
show databases;
USE K_COVID19;
create table PatientInfo(
patient_id BIGINT,
sex VARCHAR(10),
age VARCHAR(10),
country VARCHAR(50),
province VARCHAR(50),
city VARCHAR(50),
infection_case VARCHAR(50),
infected_by BIGINT,
contact_number INT,
symptom_onset_... | true |
d74b67bcd64dfa08e24714fb1c6034e1a6faa3b3 | SQL | adhtanjung/Back-End | /BackEnd-JC1504-day-9/sql-data/day7data.sql | UTF-8 | 6,708 | 3.171875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.17, for Win64 (x86_64)
--
-- Host: localhost Database: jc1504
-- ------------------------------------------------------
-- Server version 8.0.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.