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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
393bce309c912470dacdc35f57bbc70d1d5ed150 | SQL | katiehuang0802/CS61A | /Documents/CS61A/CS61APythonLab/lab11/lab11.sql | UTF-8 | 426 | 3.65625 | 4 | [] | no_license | .read sp20data.sql
CREATE TABLE obedience AS
SELECT seven, instructor FROM students;
CREATE TABLE smallest_int AS
SELECT time, smallest FROM students WHERE smallest > 2 ORDER BY smallest LIMIT 20;
CREATE TABLE matchmaker AS
SELECT first.pet, first.song, first.color, second.color
FROM students AS first, stude... | true |
7fac108c480391d126500c830c494d9543abc076 | SQL | coyle5280/pubg | /postgres/pubg/helperQueries.sql | UTF-8 | 5,079 | 3.734375 | 4 | [] | no_license | --SELECT * FROM pubg.match_record where player_id = 'account.b528e5b410294a45821dd8678d2acb9c' limit 1
--delete from pubg.match where match_id = '452f1cc3-e2af-48bf-9f5b-51fee645ba46'
-- delete from pubg.match_record where match_id = '452f1cc3-e2af-48bf-9f5b-51fee645ba46'
--delete from pubg.match where match_id = 'b... | true |
92b904beee6ad7d78ba919032a585579e1bfa649 | SQL | MinhHuong/Programmation_backup | /BaseDonnes/TD1/ques2-12.sql | UTF-8 | 129 | 3.328125 | 3 | [] | no_license | select nom_acteur, count(a.numero_acteur)
from acteur a, role ro
where a.numero_acteur = ro.numero_acteur
group by nom_acteur; | true |
b5539b19220a7636901caa4b774d1b99ed02ac92 | SQL | analogrithems/Molotov | /App/Modules/Auth/Scripts/mysql.schema.sql | UTF-8 | 2,947 | 3.578125 | 4 | [] | no_license | --
-- Table structure for table `capability`
--
CREATE TABLE IF NOT EXISTS `av_capability` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`capability` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
--
-- Table stru... | true |
53aa58e2c5bf4bf827be4b71b82d795cdc5a3a66 | SQL | AlbertAkimov/rest_api | /src/main/resources/database/initDB.sql | UTF-8 | 1,760 | 3.921875 | 4 | [] | no_license | create table if not exists customers(
id bigint auto_increment primary key,
uuid_id varchar(36),
first_name varchar(50) not null,
last_name varchar(100) not null,
status varchar(25) default 'ACTIVE',
unique (uuid_id)
);
create table if not exists cards(
id bigint auto_increment primary key,... | true |
73e3ac9f6ed47205800639a2d5bffbb510591765 | SQL | Dgamers/ProjectB | /src/main/sql/bysj.sql | UTF-8 | 10,061 | 3.109375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : javaweb
Source Server Version : 50536
Source Host : localhost:3306
Source Database : bysj
Target Server Type : MYSQL
Target Server Version : 50536
File Encoding : 65001
Date: 2018-05-22 21:55:43
*/
SET FOREIGN_KEY_CHECK... | true |
518af4caa88523333eece719124a30a5b1181e03 | SQL | Siko91/TelerikAcademy-FULL | /Homeworks/TelerikAcademy--DataBases/Advanced-SQL/Task21-DeleteData.sql | UTF-8 | 219 | 2.671875 | 3 | [] | no_license | USE [TelerikAcademy]
/***
Write SQL statements to delete some of the records from the Users and Groups tables.
***/
DELETE FROM Groups
WHERE Name LIKE '%UPDATED%';
DELETE FROM Users
WHERE Username LIKE '%New%';
| true |
fb6b546b9bb904c6a8a0eae2cbccb220dbb44a32 | SQL | nikkirfernandez/HomeKo | /SQLdump/UC1S1.sql | UTF-8 | 24,660 | 2.765625 | 3 | [
"MIT"
] | permissive | -- MySQL dump 10.13 Distrib 5.7.25, for Linux (x86_64)
--
-- Host: localhost Database: homeko
-- ------------------------------------------------------
-- Server version 5.7.25-0ubuntu0.18.04.2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET... | true |
1b052ba97457c0476e9de61c97ce6761c959d0e2 | SQL | shiva-lashkari/MSA8040 | /Archive/queries_vida.sql | UTF-8 | 1,881 | 3.828125 | 4 | [] | no_license | use cecs;
-- a
SELECT count(*) as Total_CC_2020 FROM conference WHERE year(conference_date) = 2020;
-- b
SELECT co.company_ticker, conference_date FROM conference INNER JOIN company as co USING(company_id) WHERE year(conference_date) = 2020;
-- c - how many:
select co.company_ticker, conference_date, count(partici... | true |
3ba3ab007af0d2286afec26e5b4a10ba84caf141 | SQL | ce-casitas/lasCasitas | /dbcasitas.sql | UTF-8 | 9,566 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 14-04-2017 a las 17:58:56
-- Versión del servidor: 10.1.19-MariaDB
-- Versión de PHP: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
DROP DATABASE IF EXISTS dbcasitas;
CREA... | true |
f1270492503795ef9f4a5470702b3062a31468a5 | SQL | sky1006/www | /php/lamp14_DB/book/books.sql | UTF-8 | 512 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2015/3/16
* Time: 16:57
*/
CREATE database if NOT EXISTS boostore;
DROP TABLE if EXISTS books;
CREATE TABLE books(
id int not null auto_increment,
bookname VARCHAR (50) NOT NULL DEFAULT '',
publisher VARCHAR (80) NOT null DEFAULT '',
autho... | true |
01d16b832272b8d4c8f9f637dccce8cb8474f229 | SQL | forchain/AUSPublication | /Code/SQL/UpdateScoreByMatch.sql | UTF-8 | 1,063 | 3.1875 | 3 | [] | no_license | update
Score AS s
INNER JOIN ResolvedMatch AS rm ON (s.ID = rm.ScoreID)
SET
s.AuthorID = m.AuthorID,
s.AuthorCode = m.AuthorCode,
s.AuthorName = m.AuthorFullName,
s.AHCI = CalcScore(
IsStudent,
[Index],
1,
FacultyCount,
AuthorCount
),
s.BHCI = Calc... | true |
a1e6e3dbafbde4782bab5e6cbe07fe00e7b24e63 | SQL | carlos8a02/SistemaTesis | /savia.sql | UTF-8 | 41,954 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 06-03-2021 a las 02:28:37
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
ebe5257cfbcea6508147b2bd0a65c897798b78cf | SQL | ivancekic/sql-data-analysis | /sql/ZAVISNI_TROSKOVI/UPITI_SUNCE/z_tro iz kalk_nab.sql | UTF-8 | 427 | 2.546875 | 3 | [
"MIT"
] | permissive | Select stavka,proizvod,kolicina,jed_mere,broj_koleta,lot_serija
, rok,lokacija,cena,faktor,kolicina_kontrolna,rabat,porez,cena1,k_robe
, z_troskovi
, round( round(kolicina*(cena1),4)
-
round(kolicina*cena*(1-rabat/100),4)
,2) z_tro_pr
,Neto_KG,Proc_Vla... | true |
fb6f383098e6fb695d8c781631dd5a3bfcd8c8ae | SQL | kingofluck/HandWriteEmpire-Backstage | /sql/201806122213.sql | UTF-8 | 6,815 | 3.046875 | 3 | [] | no_license | /*
SQLyog Ultimate - MySQL GUI v8.2
MySQL - 5.5.5-10.1.19-MariaDB : Database - handwrite
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD... | true |
64bf263fd2725450f82221ca3ec6a5725d165952 | SQL | nflpickspool/nflpickspool | /picks_pool_db_sql.sql | UTF-8 | 1,704 | 3.484375 | 3 | [] | no_license | CREATE TABLE players (
player_id INT,
f_name VARCHAR(25),
l_name VARCHAR(35),
handle VARCHAR(30),
email VARCHAR(75),
date_of_birth DATE,
city VARCHAR(50),
state VARCHAR(2),
ZIP VARCHAR(5)
PRIMARY KEY (player_id)
);
CREATE TABLE teams (
team_id INT,
region_name VARCHAR (40),
team_... | true |
c1bac73fe198c15336a1f69f04f4e1af13ca854c | SQL | radtek/ICS5200 | /src/sql/Runtime/TPC-DS/tpcds100/Query/query_88.sql | UTF-8 | 8,316 | 3.40625 | 3 | [] | no_license | SELECT *
FROM (SELECT Count(*) h8_30_to_9
FROM store_sales,
household_demographics,
time_dim,
store
WHERE ss_sold_time_sk = time_dim.t_time_sk
AND ss_hdemo_sk = household_demographics.hd_demo_sk
and ss_item_sk between 95700 ... | true |
3ea7b29de3109dfbf434faebf720e8c5d8c3f250 | SQL | CEYeYuan/CommunityFund-Site-Final | /scripts/db/cfProductionSetup.sql | UTF-8 | 6,183 | 3.734375 | 4 | [] | no_license | -- -----------------------------------------------
-- cfProduction MySQL Database Setup Script
-- -----------------------------------------------
-- -----------------------------------------------
-- GENERAL NOTES
--
-- - DATETIME is a MySQL data type only
-- - All pictures will be stored as relative pa... | true |
ef76c10b456eb073e5050cd3c13658e4c7d2861f | SQL | annie0sc/gdp-happy-health | /Design Data/SQL QUERIES/target.sql | UTF-8 | 701 | 3.015625 | 3 | [] | no_license | DROP TABLE Target_tbl;
Create table Target_tbl(
Targetname varchar(30),
Targetdescription varchar(40),
Targetnumericalgoal number(20),
CONSTRAINT target_table_pk primary key(Targetname));
Insert into Target_tbl values('3K Run', 'Takeupthischallengetocompleterunningfor3kilometers', 3);
Insert into Target_tbl values('5... | true |
fd660b4763cec60912585ecf8e665d061a6c0c4a | SQL | MarcceloSelv/DBA | /Análise/Virtual ou Físico.sql | UTF-8 | 689 | 3.4375 | 3 | [] | no_license | /*
A Simple script to verify whether your SQL Server is running on a Physical Box or a Virtual machine without RDP'ing into your server.
Note: This Script works only on 2008R2 SP1 and above..
*/
SELECT SERVERPROPERTY('computernamephysicalnetbios') AS ServerName
,dosi.virtual_machine_type_desc
,Server_type = CASE
W... | true |
93d6ae38a188b9467d8349831eefbe7546fc6fd3 | SQL | arvi9/sqlserver-kit | /Scripts/Backup_Restore_What’s_My_Status.sql | UTF-8 | 1,653 | 3.515625 | 4 | [
"MIT"
] | permissive | /*
Author: Chris Yates
Original link: http://www.sqlservercentral.com/blogs/the-sql-professor/2017/01/26/backuprestorewhats-my-status/
*/
--By checking only for the restore and backup command lines you will be able to quickly identify your session id
--and get an approximate ETA and percentage complete. you can tinke... | true |
5d8099f4f71c5edb79c0fe9ce55f3d69d9e1539c | SQL | big-mouth-cn/nvwa | /nvwa-authority/src/main/java/org/bigmouth/nvwa/authority/creates.sql | UTF-8 | 4,499 | 3.796875 | 4 | [] | no_license | CREATE SEQUENCE seq_common_user
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1000
CACHE 1;
CREATE SEQUENCE seq_common_role
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1000
CACHE 1;
CREATE SEQUENCE seq_common_resource
INCREMENT 1
MINVALUE 1
MAXVALUE 922337203685477580... | true |
faea570502084534f915bb20e8352f794f3910cd | SQL | elfbobo/TJ_Smart_Park | /plugins/DemoExample/install/install.sql | UTF-8 | 2,571 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive |
CREATE TABLE IF NOT EXISTS `eacoo_demo_example` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(60) NOT NULL DEFAULT '' COMMENT '标题',
`email` varchar(120) DEFAULT '' COMMENT '邮箱',
`password` varchar(32) DEFAULT '' COMMENT '密码',
`sex` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别。0保密,1... | true |
51c19a3a8ee04d98597cd1e0b194b2dd85d22b57 | SQL | hill-giant/HackerRank-Submissions | /mysql/WeatherObservationStation5.sql | UTF-8 | 152 | 2.515625 | 3 | [] | no_license | SELECT CITY,LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY),CITY ASC LIMIT 1;
SELECT CITY,LENGTH(CITY) FROM STATION ORDER BY LENGTH(CITY) DESC LIMIT 1;
| true |
31dd214731cba8c34793df8443b640f26c875d75 | SQL | gitzxon/force-based-graph | /mINFO/release/sql/02_t_tag.sql | UTF-8 | 237 | 2.671875 | 3 | [] | no_license | -- Table: t_tag
-- DROP TABLE t_tag;
CREATE TABLE t_tag
(
id_tag integer NOT NULL,
name character varying NOT NULL,
CONSTRAINT t_tag_pkey PRIMARY KEY (id_tag)
)
WITH (OIDS=FALSE);
ALTER TABLE t_tag OWNER TO postgres;
| true |
21e5b06c60b30e3599c02ec9f04cff7c1c1ba0ae | SQL | Cold23/Project_CRUD_app | /sqlbackups/birthday.sql | UTF-8 | 1,186 | 4.34375 | 4 | [
"MIT"
] | permissive | SELECT
bday_alc.card_id,
ROUND((bday_alc.amount * 100) / (alc.total),2) AS perc_of_total_in_bday,
married,
children AS no_of_children
FROM
(SELECT
c.card_id,
SUM(tc.amount) AS amount,
c.married AS married,
c.children AS children
FROM
customer... | true |
eaf898477b1a1852768dba065eb339ab6d9fcbd5 | SQL | opengauss-mirror/openGauss-server | /src/test/regress/sql/test_unione_composite_largedata.sql | UTF-8 | 5,659 | 3.34375 | 3 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference",
"PostgreSQL",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"curl",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"CC-BY-4.0",
... | permissive | set enable_default_ustore_table = on;
create schema test_unione_composite_largedata;
set current_schema='test_unione_composite_largedata';
-- create type
create type composite as (c1 int, c2 text, c3 boolean);
create type nested_composite_type as (c1 int, c2 composite);
create type composite_type_largedata as (c1 int... | true |
8959fabf00c87d49daea9696eef5ac117cfa54a5 | SQL | albertomattos/SQL_gerais | /Mega - Insert de agentes particulares.sql | UTF-8 | 520 | 2.96875 | 3 | [] | no_license | drop table agentes;
create global temporary table agentes (agn_in_codigo number(7));
insert into agentes
select mgglo.glo_agentes_id.agn_in_codigo
from mgglo.glo_agentes_id
where agn_st_codigoalt like 'P%'
and agn_in_codigo not in (select agn_in_codigo from mgglo.glo_contasagentes);
insert into mgglo.glo_contasagentes
... | true |
4a61fd085c80525f73ea867e086b659d1d058046 | SQL | AJFaraday/conference-repo | /talks/squirrel/queries/07-feeding.sql | UTF-8 | 276 | 3.75 | 4 | [] | no_license | /* animals not fed today */
select a.name
from animals a
where a.last_fed < (sysdate - 1)
/* animals with no keeper */
select
a.*
from animals a
left outer join animals_keepers ak on ak.animal_id = a.id
left outer join keepers k on k.id = ak.keeper_id
where k.name is null; | true |
7df04b434f5a98e772c6a1cb2440fa9b73cc4933 | SQL | TomerMizrachi/studio-proj-mysql-c- | /project doc/tables builed qu/studio_instrument.sql | UTF-8 | 2,455 | 2.984375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: studio
-- ------------------------------------------------------
-- Server version 8.0.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!4... | true |
b4b3d3af362a1e9d5d8cee92f847472d5065deea | SQL | Heontae/SQL | /Practice/practice05.sql | UTF-8 | 7,715 | 4.6875 | 5 | [] | no_license | /*문제1.
담당 매니저가 배정되어있으나 커미션비율이 없고, 월급이 3000초과인 직원의
이름, 매니저아이디, 커미션 비율, 월급 을 출력하세요.
(45건)*/
SELECT
e.first_name "이름",
e.manager_id "매니저아이디",
e.commission_pct "커미션비율",
e.salary "월급"
FROM
employees e
WHERE
e.manager_id IS NOT NULL
AND e.commission_pct IS NULL
AND... | true |
b4b4b2f2410e0215aad58c0f6a33020ed57d7bd4 | SQL | 1213042026/EducationalManagementSystem | /da.sql | UTF-8 | 42,746 | 2.578125 | 3 | [] | no_license | create table ems_profession(
idnum varchar(20),
pro_name varchar(100),
remarks varchar(1000)
);
insert into ems_profession values('0001','¼ÆËã»ú¿ÆÑ§Óë¼¼Êõ',null);
insert into ems_profession values('0002','µç×ÓÐÅÏ¢¼¼Êõ',null);
insert into ems_profession values('0... | true |
9aa994499684fe649b50fbc6240ff83154167de4 | SQL | Optixal/InfoSecLibrary | /SQL/Simple StoredProc and Triggers.sql | UTF-8 | 743 | 3.6875 | 4 | [] | no_license | CREATE TABLE Loan
(Loan_ID varchar(4),
Loan_Amt integer,
Cust_ID varchar(5),
Loan_Start_Date date,
Loan_End_Date date,
Amt_Paid integer,
PRIMARY KEY (Loan_ID))
SELECT * FROM Loan
INSERT INTO Loan
VALUES
('L908', 486700, 'C7321', '05/09/1999', '05/08/2019', 130000)
CREATE PROCEDURE OutstandingAmt
@ID varchar(5)
AS
S... | true |
b98f8238342536fdbde9d58ca873dfbd61299b23 | SQL | AMRoche/Palimals | /database/db.sql | UTF-8 | 1,114 | 3.234375 | 3 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE SCHEMA `palimals` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS `palimal` (
`name` varchar(20... | true |
c3fcda957ac7f170ae375b74fc3a683cd26ddbbf | SQL | deuxbergersallemands/project-final-testing- | /app/assets/sql/tasksToUs.sql | UTF-8 | 267 | 3.25 | 3 | [] | no_license |
CREATE TABLE IF NOT EXISTS `TasksToUserStories`(
`taskId` INT(11) NOT NULL,
`usId` INT(11) NOT NULL,
PRIMARY KEY (`taskId`, `usId`),
FOREIGN KEY (`taskId`) REFERENCES Tasks(`taskId`),
FOREIGN KEY (`usId`) REFERENCES UserStories(`usId`)
)
| true |
f63c4732f7bb5ee8ad83ca00f0285b9ef91f4b0c | SQL | danieelnagy/DatabaseTest | /insertThat_db.sql | UTF-8 | 1,667 | 2.875 | 3 | [] | no_license | insert into offices(name, adress) values
('HomeOffice', 'FlexAdress 33'),
('Tsmc', 'Secret 22'),
('Normady', 'MassRelay 11');
insert into employees(name, email, adress, comments, office_id) values
('Jonas', 'Jonas@company.com', 'VasaGatan 1', 'KaffeManiac', 1),
('Medi', 'Medi@zalando.se', 'Everywhere 99', 'Festa... | true |
c35dadee1724796883a0e50dfbbbb0b6cfa91fca | SQL | Darkooo1/Darkec | /moodle.sql | UTF-8 | 6,261 | 3.140625 | 3 | [] | no_license | drop database if exists assignment;
create database assignment;
use assignment;
create table assign (
key_a bigint (10) not null primary key auto_increment,
course bigint (10),
name varchar (255),
intro longtext,
introformat smallint (4),
alwaysshowdescription tinyint (2),
no... | true |
5dc3ea16a400503da4d9e1d6926bc1767efbef2d | SQL | marcduby/MachineLearningPython | /DccKP/Translator/Cllingen/loadClingenEdges.sql | UTF-8 | 6,156 | 3.96875 | 4 | [] | no_license |
-- STEPS
-- 1 - add new phenotypes to comb_node_ontology tables
-- 1a - add field to clingen load table
-- 1b - find MONDO IDs that are in the db already
-- 1c - create code from description for phenotype if not already loaded
-- 1d - add disease to lookup table if not there yet
-- 2 - add the edge data
-- STEP 0 - ... | true |
3ca10ae06c6c72a5a3bae48b93078436befcdbcc | SQL | AmilcarDominguez/Base_de_datos_1 | /Eje5.sql | UTF-8 | 578 | 2.609375 | 3 | [] | no_license | drop table if exists peliculas;
create table peliculas(nombre varchar(20), actor varchar(20), duracion integer,cantidad integer);
describe peliculas;
insert into peliculas (nombre, actor, duracion ,cantidad) values ('Mision imposible','Tom Cruise',120,3);
insert into peliculas (nombre, actor, duracion ,cantidad) values... | true |
2995efa87e4bdfd3f3112faa54a18969013028b1 | SQL | lxdmp/springmvc_learning | /src/main/resources/db/mysql/create-table.sql | UTF-8 | 5,566 | 3.8125 | 4 | [] | no_license | SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE SCHEMA IF NOT EXISTS `test` DEFAULT CHARACTER SET utf8 ;
USE `test` ;
-- -----------------------------------... | true |
642126c5c7f9fb9d23292be71e9c8c7e32f79667 | SQL | IribarrenWeb/Laragram | /database.sql | UTF-8 | 4,242 | 3.5625 | 4 | [] | no_license | CREATE DATABASE IF NOT EXISTS laravel_master;
USE laravel_master;
CREATE TABLE IF NOT EXISTS users(
id int(255) auto_increment not null,
role varchar(50) not null,
name varchar(100) not null,
surname varchar(100) not null,
nick varchar(100) n... | true |
916418d8e0ef52312457896680d1c7529f358b36 | SQL | anhstudios/swganh | /data/sql/swganh_static/scripts/csr_subcategories.sql | UTF-8 | 3,313 | 3.0625 | 3 | [
"MIT"
] | permissive | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.1.63-community - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2012-10-14 17:59:16
... | true |
d4d642d0ee7ec5f32fc009f6fe389a9c00ed39db | SQL | kanomoku/004_select_student_in_db_show_in_page_mybatis_improve_practise-maven-mybatis-mysql-servlet-jsp | /src/main/resources/readme.sql | UTF-8 | 289 | 2.515625 | 3 | [] | no_license | drop table people
create table people (
id int(10) primary key auto_increment comment '编号',
name varchar(20) comment '姓名',
age int(3) comment '年龄'
) COMMENT'人员信息表';
insert into people values(default,'王五',23);
insert into people values(default,'赵六',31); | true |
1f0b00b3d54971d5461250ed296f80bb2e94390a | SQL | douit/cqes_dev | /重庆二师_Dev/dw_mpp/table/fdm/edu_hb_bzlb.sql | UTF-8 | 1,081 | 2.671875 | 3 | [] | no_license | /*
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: li.zhanlei@h3c.com
# COMPANY: h3c.bigdata
# VERSION: 1.0
# CREATED: 2017/06/30
# REVIEWER:
# REVISION: ---
*/
set names utf8;
use fdm;
DROP TABLE IF EXISTS edu_hb_bzlb;
CREATE TA... | true |
b0cca8166b5bfbec8158c16510f3815ef0d7828a | SQL | jisie/mastering_sql_practice_exercises | /joining_data.sql | UTF-8 | 1,536 | 4.34375 | 4 | [] | no_license | -- Get a list of the sales that was made for each sales type.
SELECT
s.*,
st.name
FROM
sales s
INNER JOIN salestypes st ON st.sales_type_id = s.sales_type_id;
-- Get a list of sales with the VIN of the vehicle, the first name and last name of the customer, first name and last name of the employee who made the ... | true |
7b62e0fec52f484184500ca00839afc03abe4b34 | SQL | diycp/xenon-wms | /db.sql | UTF-8 | 14,409 | 3.15625 | 3 | [
"Apache-2.0"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50553
Source Host : localhost:3306
Source Database : wms
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2017-12-30 14:29:58
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---------... | true |
001190e16e597fd3d422f33f902eb07bbebfd7af | SQL | dariahauer/Homework25.2 | /src/Homework25.2.sql | UTF-8 | 3,986 | 4.1875 | 4 | [] | no_license | punkt 1.
CREATE TABLE pracownik (
id INT AUTO_INCREMENT PRIMARY KEY,
imie VARCHAR(20),
nazwisko VARCHAR (30) not null,
wyplata DECIMAL(10,2),
data_urodzenia DATE,
stanowisko VARCHAR(30));
punkt 2.
INSERT INTO pracownik(imie, nazwisko, wyplata, data_urodzenia, stanowisko)
VALUES ('Maja','Kijowska',6000, '1982-03-12',... | true |
2b5c19eeb9b3e7d2e4255bc767faa5eea19d2435 | SQL | yoonng/Project-History | /PLM/sql/indexreport.sql | UTF-8 | 3,331 | 3 | 3 | [] | no_license | REM
REM --------------------------------------------------------------------
REM
REM indexreport.sql
REM
REM Used to get the object identifiers of all the indexable objects in the
REM Windchill system for mass index loading. Right now that consists of ...
REM
REM classname tablename
REM ----... | true |
1d3ee51448d8cdec9052f2ae065ca4753852e683 | SQL | algsun/galaxy | /src/main/resources/db/migration/V20170622_1627__add_o_comment.sql | UTF-8 | 536 | 2.8125 | 3 | [] | no_license | -- author bai.weixing
-- description 添加专家点评表comment
CREATE TABLE IF NOT EXISTS `o_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`organization` varchar(50) DEFAULT NULL COMMENT '组织单位',
`expert` varchar(50) NOT NULL COMMENT '专家名称',
`advice` varchar(300) NOT NULL COMMENT '验收意见',
`date` datetim... | true |
fb9e13a478ea61e24760fe4094403c0c63d9f96e | SQL | zhi4hua/Notes | /SQL_MySQL/chapter-nine/查询不在表.sql | UTF-8 | 206 | 3.3125 | 3 | [] | no_license | # 查询不在表 job_current 中的每位。
SELECT mc.first_name, mc.last_name FROM my_contacts AS mc
WHERE NOT EXISTS
(SELECT * FROM job_current AS jc
WHERE jc.contacts_id = mc.contacts_id)
| true |
0efdccad8b7bab9eb8ac1375867658db21cccf7e | SQL | shivdeepmodi/Setup | /sqlpath/sql_id.sql | UTF-8 | 3,493 | 3.1875 | 3 | [] | no_license | undefine sql_id
define sql_id=&1
undefine inst_id
col sql_profile for a20
set verify off timing off
col first_load_time for a30
col is_bind_aware heading 'BIND|AWARE' for a5
col is_bind_sensitive heading 'BIND|SENS|ITIVE' for a5
col IS_SHAREABLE heading 'IS|SHARE|ABLE' for a5
col plan_hash_value for 9999999999 heading ... | true |
f06ee196768c51297b5022ae8785fdf1a8afece2 | SQL | nicocabral/LTO-Online-Inventory-Management-System | /OnlineInventory_Final/db/lto_2016-02-13-10-08-42.sql | UTF-8 | 8,674 | 3.140625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.6.12, for Win64 (x86_64)
--
-- Host: localhost Database: lto
-- ------------------------------------------------------
-- Server version 5.6.12-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
39133963e0cf721f19f5354381c5ca9de8271b52 | SQL | BloomPhilippe/notes-de-cours | /basededonnées/partie2/solutions-exercices/exercices_chap3b_3.sql | UTF-8 | 999 | 3.890625 | 4 | [] | no_license | -- Créez une procédure permettant de déclencher une erreur et
-- l'affichage du message adéquat si le stock du produit qu'un
-- client désire commander n'est pas suffisant
-- (paramètres : idproduit, qcom)
DELIMITER |
DROP PROCEDURE IF EXISTS check_stock_produit;
CREATE PROCEDURE check_stock_produit(
IN pi_idprodu... | true |
a7e6eaf89b383923c71daaeb18905a3cc4c0e3f6 | SQL | magosdominus/PortfolioWebsite | /Dating Website - Custom Framework, PHP/Live - Backup 12-07-2015/sql/users.sql | UTF-8 | 496 | 2.84375 | 3 | [] | no_license | /*
Author: Matthew Cormier
Filename: users.sql
Wede 3201
Discription: this table will hold login account information for users.
*/
DROP TABLE IF EXISTS users CASCADE;
CREATE TABLE users (
user_id VARCHAR(20) PRIMARY KEY,
password VARCHAR(32) NOT NULL,
user_type CHAR(1) NOT NULL,
email_address VARC... | true |
0bb906396d91b4e144166ff94961cc831ca26547 | SQL | codenation-dev/squad-6-aceleradev-fs-online-1 | /backend/db/migrations/20190601_150600_create_table.up.sql | UTF-8 | 1,017 | 3.296875 | 3 | [] | no_license | --sigla: pagfun
CREATE TABLE pagamento_funcionario(
pagfun_id INTEGER NOT NULL,
pagfun_nome VARCHAR(200) NOT NULL,
pagfun_cargo varchar(200) NOT NULL,
pagfun_orgao varchar(200) NOT NULL,
pagfun_remuneracao numeric(18,2) not null,
pagame_id ... | true |
d54a82140286d6ad3c28e2d3b7f8bc55631b4c2e | SQL | taknb2nch/golangcafe | /04/mysql/create_table.sql | UTF-8 | 444 | 3.390625 | 3 | [] | no_license | --
drop table if exists table1 cascade;
create table table1 (
id INT not null AUTO_INCREMENT comment 'id'
, display_name VARCHAR(100) comment '表示名'
, sex CHAR(1) not null comment '性別'
, birthday DATETIME comment '誕生日'
, age INT comment '年齢'
, married boolean comment '既婚'
, rate FLOAT comment 'レート'
, s... | true |
c7c6905d9d63050ec3ab8fef1f6dc790f969e07b | SQL | liupzmin/db_health | /script/tablespace_incre_pct.sql | GB18030 | 1,726 | 4.09375 | 4 | [] | no_license | --sysdateܲ鵽ĵһ죬awrһ9ݣһӼ㣬ʲȷʶų
SELECT A.NAME,
B.TABLESPACE_ID,
B.DATETIME,
ROUND(B.USED_SIZE_MB,2) USED_SIZE_MB,
ROUND(B.INC_MB,2) INC_MB,
CASE
WHEN SUBSTR(INC_RATE, 1, 1) = '.' THEN
'0' || INC_RATE
WHEN SUBSTR(INC_RATE, 1, 2) = '-.' THEN
'-0' || S... | true |
25044e7595713072dd5c6585b77bb19b12c7feb8 | SQL | MgLEviL/SQL | /PL-SQL/procedures_conciertos.sql | UTF-8 | 4,490 | 3.765625 | 4 | [] | no_license | --1
exec horariosConcierto(3);
CREATE or replace PROCEDURE horariosConcierto
(codc in decimal)
IS
nom concierto.titulo%type;
prov concierto.localidad%type;
contador decimal;
sumatorio decimal;
BEGIN
select titulo, localidad into nom, prov fr... | true |
d4c5d93585602f445362aad9b06015b9f0b777a0 | SQL | moritetu/walreader | /walreader--1.0.sql | UTF-8 | 1,582 | 3.171875 | 3 | [] | no_license | /* contrib/walreader/walreader--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION walreader" to load this file. \quit
CREATE TYPE waldata AS
(
timeline INT4,
walseg TEXT,
seg_off INT4,
page INT4,
page_off INT4,
rmgr TEXT,
rec_len ... | true |
d2e1896eb56e9fbd8f0d7c3658b3a706035aa79a | SQL | PrayerEzio/Sirius | /Mysql/sirius_db.sql | UTF-8 | 2,290 | 2.90625 | 3 | [] | no_license | # Host: 127.0.0.1 (Version: 5.6.17)
# Date: 2015-11-03 17:54:00
# Generator: MySQL-Front 5.3 (Build 4.234)
/*!40101 SET NAMES utf8 */;
#
# Structure for table "sirius_admin"
#
DROP TABLE IF EXISTS `sirius_admin`;
CREATE TABLE `sirius_admin` (
`admin_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`admin_name` v... | true |
a1dacd66a4fb9338e39db5349d891c86b76214af | SQL | madrix01/RedditSQL | /test.sql | UTF-8 | 301 | 2.921875 | 3 | [] | no_license | -- @BLOCK
SELECT id, username FROM Users;
-- @block
SELECT id, srName FROM Subreddit;
-- @BLOCK
SELECT title, body, srID FROM Posts
INNER JOIN Subreddit on Subreddit.id = srID;
-- @BLOCK
SELECT title, body FROM Posts
INNER JOIN Users ON Users.id = userID
WHERE userID = 2;
--@BLOCK
DESCRIBE Posts
| true |
5144ce72bae51bd68b066486647bdfc8e2fea503 | SQL | manuelvalverde/BD1819 | /querrySQL.sql | UTF-8 | 1,777 | 3.75 | 4 | [] | no_license | 1-SELECT num_processo_socorro FROM acciona GROUP BY num_processo_socorro HAVING COUNT(num_processo_socorro) = (SELECT MAX(C) FROM (SELECT COUNT(num_processo_socorro) AS C FROM acciona GROUP BY num_processo_socorro) AS Q);
2-SELECT nome_entidade FROM meio NATURAL JOIN audita WHERE data_hora_inicio>'2018-06-20 23:59:5... | true |
08fa532c2a3b4f19b0b52f9713aa72ac9222a161 | SQL | aipim-org/aipimStartAppRestAPI | /sql/createcarts.sql | ISO-8859-2 | 595 | 2.515625 | 3 | [
"MIT"
] | permissive | use smartcarth;
drop table carts;
create table carts(
uid int(11) primary key auto_increment,
label varchar(200) not null default 'rtulo da lista',
likes int(11) not null default 0,
type varchar(20) not null default 'cart',
price double not null default 99999.99,
price_save double not null default 999... | true |
826ab8e6007bca0322362dbd7b5fbe2a1f831253 | SQL | JohannCepeda16/Bases-de-datos | /Proyecto/jclg2020mbda/Ciclo 1/Componentes/CRUDOK.sql | UTF-8 | 2,245 | 3.234375 | 3 | [] | no_license | ---OFERTAS
EXECUTE PC_OFERTAS.AD_OFERTAS(1, 'DESARROLLADOR FRONT', 'SE BUSCA DESARROLLADOR FRONT END CON CONOCIMIENTOS EN REACT JS', '+1 EXP', 2, 'BOGOTA, LA CANDELARIA', 2500000, 'R');
SELECT * FROM OFERTAS;
EXECUTE PC_OFERTAS.MOD_OFERTAS(1, 'DESARROLLADOR FRONT REACT JS', 'SE BUSCA DESARROLLADOR FRONT END CON CON... | true |
da5c78ce9cdee32dcd54eac8ff2943a5caeb9b43 | SQL | carsonshan/InformationSystem | /samples/plugins/org.obeonetwork.sample.demo.weblogng.business/src/weblogng-ddl.sql | UTF-8 | 2,162 | 3.8125 | 4 | [] | no_license | -- Start of user code DB Name
-- TODO specify the name of database used
USE weblogng;
-- End of user code
-- Tables for Entity BlogEntry
DROP TABLE IF EXISTS BLOG_ENTRY;
CREATE TABLE BLOG_ENTRY
(
ID CHAR(32) NOT NULL,
TITLE VARCHAR(255) NOT NULL,
CREATION_DATE DATETIME NOT NULL,
CONTENT VARCHAR(255)... | true |
68b8fbe380f3927872401b0d3db060fdb5b73898 | SQL | RScicomp/Library-Loans-Database | /q17.sql | UTF-8 | 255 | 3.921875 | 4 | [] | no_license | (SELECT book.bid, COUNT(loan.bid) as numloans
FROM book, loan
WHERE book.bid = loan.bid
GROUP BY book.bid
ORDER BY book.bid)
UNION
(SELECT DISTINCT bid, 0 as numloans
FROM copy
WHERE NOT EXISTS(
SELECT
FROM loan
WHERE loan.bid = copy.bid))
ORDER BY bid; | true |
6afe0d4d2ca6f39c1b21ab856c28c4db9f7abf2a | SQL | TekGlobalOptumStudent/per_scholas_case_study | /sql/data.sql | UTF-8 | 7,671 | 2.796875 | 3 | [] | no_license | -- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.5.9-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.2.0.6213
-- ------------------------------------------------... | true |
bae09c9e2c51bb22e523844fb1ba8e91a24bdd03 | SQL | fares-data-build-tool/fdbt-aws | /sql/import/nocTable.sql | UTF-8 | 513 | 2.703125 | 3 | [
"MIT"
] | permissive | SET
FOREIGN_KEY_CHECKS = 0;
TRUNCATE nocTable;
LOAD DATA
FROM
S3 's3-eu-west-2://fdbt-noc-data-test/NOCTable.csv' REPLACE INTO TABLE nocTable FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '' LINES TERMINATED BY '\n' IGNORE 1 lines (
nocCode,
operatorPublicName,
vosaPsvLicenseName... | true |
b1a3f748c901faa84ab7059077a05f218a64ed4d | SQL | nhan2804/supconnect | /phpmyadmin.session.sql | UTF-8 | 223 | 3.15625 | 3 | [
"MIT"
] | permissive |
--@block
CREATE INDEX title_index ON movies(title);
--@block
ALTER TABLE movie_genres
ADD FOREIGN KEY (movie_id) REFERENCES movies(id);
--@BLOCK
ALTER TABLE movie_genres
ADD FOREIGN KEY (genre_id) REFERENCES genres(id);
| true |
045b3d02a81f8a5ec20833a9bd16180f94aebef1 | SQL | barucharky/coding-deep-dive | /sql/sql-hw-tasks/baruch/logical-order.sql | UTF-8 | 492 | 2.828125 | 3 | [] | no_license | -- B''H --
/*
WRITTEN ORDER
-------------
select
from
where
group by
having
order by
*/
/*
LOGICAL ORDER
-------------
from
where
group by
having
select
order by
*/
-- ------------------------------------------------------
-- Example 1:
select state_name st_name,
*
from `data-science-... | true |
b5cce6a0d1fc4ed24e2298f9f9a3045ec983e122 | SQL | zxggo/inventory-system-by-PyQt5 | /sleep.sql | UTF-8 | 74,358 | 2.875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : mysql
Source Server Type : MySQL
Source Server Version : 50723
Source Host : localhost:3306
Source Schema : sleep
Target Server Type : MySQL
Target Server Version : 50723
File Encoding : 65001
Date: 03/01/... | true |
897d70d6e9bb4f28e8ec38f3c9639edf56ad7521 | SQL | pxotmane/Udacity-SQL-queries | /create_db_udacity.sql | UTF-8 | 2,143 | 3.921875 | 4 | [] | no_license | /*
odrders table: id account_id occurred_at standard_qty gloss_qty poster_qty total standard_amt_usd gloss_amt_usd poster_amt_usd total_amt_usd
accounts table: id name website lat long primary_poc sales_rep_id
region table: id name
sales_reps table: id name region_id
web_events: id account_id occurred_at channel
... | true |
211bbfb815232bf7ba2078dd7bd02b4f31c09a8f | SQL | YasserMohsen/YasserBlog-Catalyst | /root/static/yasserblog_v1.sql | UTF-8 | 1,177 | 3.609375 | 4 | [] | no_license | CREATE TABLE `users` (
`id` INT(10) NOT NULL AUTO_INCREMENT,
`fname` varchar(20) NOT NULL,
`lname` varchar(20) NOT NULL,
`username` varchar(30) NOT NULL UNIQUE,
`email` varchar(40) NOT NULL UNIQUE,
`password` varchar(42) NOT NULL,
`gender` varchar(10) NOT NULL,
`role` varchar(10) NOT NULL,
`avatar` varchar(40... | true |
28b41e94b7c07f0e6b4414ce28f42d3bdafe24ef | SQL | senpaijaro/mvc-crud-ajax-express-basic | /crud_app.sql | UTF-8 | 4,439 | 3.046875 | 3 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50732
Source Host : localhost:3306
Source Schema : crud_app
Target Server Type : MySQL
Target Server Version : 50732
File Encoding : 65001
Date: 06/05/2021 2... | true |
bf682194bc413f67cd8b8c1628ed04aaa18c7f05 | SQL | Tech-Training-2021/P1_GroceryStore_TeamShivam | /SQLQuery for NatureFresh Db.sql | UTF-8 | 4,786 | 3.515625 | 4 | [] | no_license | CREATE TABLE Roles(
Id int IDENTITY(1,1) PRIMARY KEY,
Name VARCHAR(10) not null
)
CREATE TABLE Users(
Id int IDENTITY(1,1) PRIMARY KEY,
Name VARCHAR(50) NOT NULL,
Mobile INT NOT NULL,
Aadhar INT,
Roles INT FOREIGN KEY REFERENCES Roles(Id)
)
CREATE TABLE UserAddress(
Id INT IDENTITY(1,1... | true |
c2e446eb38d0c33038e0f9b0a0e15075690bd647 | SQL | forked-project/analytics66_3.0.1 | /package/product/update/sql/310.sql | UTF-8 | 566 | 2.703125 | 3 | [] | no_license | UPDATE `settings` SET `value` = '{\"version\":\"3.1.0\", \"code\":\"310\"}' WHERE `key` = 'product_info';
-- SEPARATOR --
ALTER TABLE sessions_events DROP COLUMN date_day;
-- SEPARATOR --
drop index date_day on lightweight_events;
-- SEPARATOR --
alter table lightweight_events drop column date_day;
-- SEPARATOR ... | true |
ad1b4014d3b60df735cb01e1f61a7b9b04325518 | SQL | Danmarjim/mwm-2014-2015 | /Mod1/DiseñoDB/Ejercicio5/database/DATABASE1/script.sql | ISO-8859-10 | 1,508 | 3.1875 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE AYUDAS
(
AO NUMBER NOT NULL
, TIPO_AYUDA VARCHAR2(20) NOT NULL
, EXTENSION NUMBER NOT NULL
, CANTIDAD NUMBER NOT NULL
, PARCELA NUMBER NOT NULL
, CONSTRAINT AYUDAS_PK PRIMARY KEY
(
AO
, PARCELA
)
ENABLE
);
CREATE TABLE PARCELAS
(
COD_PARCELA NUMBER NOT NULL
, ... | true |
7a9ee817bd3bad23de78b96de1f4432967fdd832 | SQL | radtek/abs3 | /sql/mmfo/bars/View/ssb_nal1.sql | UTF-8 | 1,708 | 3 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/SSB_NAL1.sql =========*** Run *** =====
PROMPT =====================================================================================
PROMPT *** Create view SSB_... | true |
b358424bb3e662bb7ceab19d3cc4ff1f2adb95c6 | SQL | NYCPlanning/ceqr-app-data | /recipes/ctpp_censustract_centroids/create.sql | UTF-8 | 622 | 3.40625 | 3 | [] | no_license | CREATE TEMP TABLE centroid (
geoid character varying,
centroid geometry(Point,4326)
);
\COPY centroid FROM PSTDIN DELIMITER ',' CSV HEADER;
CREATE TEMP TABLE tmp as (
SELECT
geoid,
centroid
FROM centroid
WHERE geoid in (
SELECT residential_geoid FROM ctpp_journey_to_work.... | true |
08c6cff07d24159ffe625050d627b4d8338e1fb3 | SQL | ReneNyffenegger/oracle-patterns | /SQLLoader/ex_13_make-unique-indexes-unusable/create_table.sql | UTF-8 | 270 | 2.515625 | 3 | [] | no_license | create table tq84_tab_with_pk (
id number,
txt varchar2(10),
--
constraint tq84_tab_pk primary key (id)
);
insert into tq84_tab_with_pk values (1, 'foo');
insert into tq84_tab_with_pk values (2, 'bar');
insert into tq84_tab_with_pk values (3, 'baz');
commit;
| true |
c2ce83fb3c378d299fbbc47d5d4fbfa8c323596f | SQL | ssgoli/comp4115-pa3 | /PA3/part_4.sql | UTF-8 | 708 | 3.953125 | 4 | [] | no_license | /*
* Procedure which return first name and last name
*
*/
DELIMITER $$
CREATE PROCEDURE get_name
(IN last VARCHAR(30))
BEGIN
SELECT first_name, last_name FROM employees
WHERE last_name = last;
END $$
DELIMITER ;
/*
*
* average salary
*/
DELIMITER $$
CREATE PROCEDURE avg_salary
(IN dept CHA... | true |
0c540340a51ad4420d45cc05d06c36fff8890726 | SQL | aFroma/ForumOpdracht | /src/database/forum.sql | UTF-8 | 5,626 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Gegenereerd op: 02 jul 2017 om 23:37
-- Serverversie: 10.1.16-MariaDB
-- PHP-versie: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
575dd89659b8efa0ff2ae4021effc903b984ce21 | SQL | ganeshbabuNN/Databases | /RDMS/Oracle Database/Listing 13_1.sql | UTF-8 | 87 | 2.703125 | 3 | [] | no_license | select e.ename,e.city,c.salary
from employee e , emp_company c
where e.ename=c.ename
/
| true |
43966513524c2a9c1b96e57bc24ecc203f117c6c | SQL | IljaGN/flatsharing | /backend/src/test/resources/data.sql | UTF-8 | 485 | 2.515625 | 3 | [] | no_license | -- REMOVE OLD DATA
SELECT truncate_tables_flatsharing();
SELECT reset_sequences_flatsharing();
-- SET NEW DATA
INSERT INTO users (id, first_name, middle_name, last_name) VALUES
(nextval('users_seq'), 'Рабодан', 'Рабоданович', 'Брейвик');
INSERT INTO credentials (user_id, login, password, salt) VALUES
(1, 'xiljagx... | true |
a5ec917c7931b315e74ea6af6c3b6487b6fec3b2 | SQL | PRAVEENAMPATI/ETL | /models/EDW/MART_SALES/MART_SALES_BACKLOG_CUSTOMER_BRIDGE.SQL | UTF-8 | 2,980 | 3.015625 | 3 | [] | no_license | --dbt run --full-refresh --select MART_SALES_BACKLOG_CUSTOMER_BRIDGE
--dbt run --select MART_SALES_BACKLOG_CUSTOMER_BRIDGE
{################# EDW Job Template Variables #################}
{%-set v_pk_list = ['BACKLOG_KEY','SNAPSHOT_DATE_KEY' ]-%}
{%-set v_house_keeping_column = ['BIW_INS_DTTM','BIW_UPD_DTTM','BIW_B... | true |
4e4c669a14c66f78a963378985d54a44493f105f | SQL | thaingo/Arecibo | /collector/src/main/sql/old/type_table_optimization.sql | UTF-8 | 1,058 | 3.828125 | 4 | [] | no_license | drop table last_type_events;
create table last_type_events
(
type_id INTEGER NOT NULL,
EVENT_TYPE_ID INTEGER NOT NULL,
TS TIMESTAMP NOT NULL,
ENTRY_MODE CHAR(1),
ENTRY_PART_1 RAW(2000),
ENTRY_PART_2 RAW(2000),
ENTRY BLOB,
primary key ( type_id , EVENT_TYPE_ID )
)
organization ... | true |
87593c454950c2263e7d349c7779a5e8d25860ad | SQL | Bakerbakura/msf1 | /db/structure.sql | UTF-8 | 5,620 | 4.03125 | 4 | [] | no_license | CREATE TABLE `customers` (
`CustID` bigint(20) NOT NULL AUTO_INCREMENT,
`Email` varchar(30) NOT NULL,
`Gender` char(1) NOT NULL DEFAULT 'M',
`password_digest` varchar(60) NOT NULL,
`ShoeSize` float unsigned DEFAULT NULL COMMENT 'System-calculated shoe size from shoes with corresponding user ID.',
`ShoeSizeE... | true |
41d2d6c07c5f0abf71b9bd9c2d6110be2fd9c6af | SQL | j7ng/CLFY_SA | /SA/PackageBodies/WEX_ORDER_PKG.sql | UTF-8 | 20,783 | 2.96875 | 3 | [] | no_license | CREATE OR REPLACE PACKAGE BODY sa.WEX_ORDER_PKG
IS
/*************************************************************************************************************************************
* $Revision: 1.8 $
* $Author: abustos $
* $Date: 2017/09/20 19:35:49 $
* $Log: WEX_ORDER_PKG.sql,v $
* Revision 1.8 2017/0... | true |
8678e34244df997ff1bef6895128e543cb779f28 | SQL | Code-Jones/Database-Design-Class-work | /Scripts/mod6notes.sql | UTF-8 | 1,001 | 3.609375 | 4 | [] | no_license | mod 6
REM acctmanager table
Drop table acctmanager;
CREATE table acctmanager
(
amid CHAR(4),
amfirst VARCHAR2(12) NOT NULL,
amlast VARCHAR2(12) NOT NULL,
amedate DATE DEFAULT SYSDATE,
amSal NUMBER(8,2),
amcomm Number(7,2) DEFAULT 0,
amearn AS (amsal + amcomm),
region CHAR(2),
CONSTRAINT acctmanager_amid_p... | true |
e112437ab5cf4fefb772dd70d6e08a85156b546e | SQL | cc66528/file | /河口视图/基础数据/6_YWS_HOS_WARD_KESHI 医院病区与科室对应关系字典表.sql | UTF-8 | 301 | 2.640625 | 3 | [] | no_license | CREATE OR REPLACE VIEW YWS_HOS_WARD_KESHI AS
SELECT T.AREA_CODE WARD_CODE,--病区编码 nvarchar(50)
T.DEPT_CODE KESHI_CODE,--科室编码 nvarchar(100)
NULL IS_DEL,--数据状态 int
NULL HOS_CODE--医院代码 nvarchar(100) 区域项目使用
FROM AREA_DEPT_REL T | true |
caba179e1e2124b51831d70324c31e9d2459d85f | SQL | dariovtx/SQLPractices | /TP-GestioDeDatos-UTN/maidana-barboso-vicentini.sql | UTF-8 | 8,163 | 4.125 | 4 | [] | no_license | /*
1-Para la emisora de radio LT10, listar la programación para la franja horaria central de
los martes, detallando programa, hora de inicio, duración, conductor(es).
*/
select *
from tpgrupo14.programa as pro
where not exists (select *
from tpgrupo14.emisora as em
where em.no... | true |
77eb834e0f554eafdbf1c35d9ecba0c78b52bf21 | SQL | joaoDossena/MIEIC-BDAD | /3rd Submission/Entrega3/int6.sql | UTF-8 | 210 | 3.125 | 3 | [] | no_license | --Mostra a média de número de estudantes nas Turmas Práticas com aula na Terça-Feira
.mode columns
.headers on
.nullvalue NULL
SELECT AVG(numEstudantes)
FROM TurmaPratica
WHERE diaSemana = 'Terça-Feira'
; | true |
aefbdef8e07fb620b2ac2e42cc80090335b948b4 | SQL | anshuman-arora99/Source_code-Laundry | /database/laundry.sql | UTF-8 | 2,893 | 3.3125 | 3 | [] | no_license |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE `laundry` (
`laun_id` int(11) NOT NULL,
`customer_name` varchar(100) NOT NULL,
`laun_priority` int(11) NOT NULL,
`laun_weight` int(11) NOT NULL,
`laun_date_received` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURR... | true |
a4726863b0746b082a4e9f2863b8bfba25fff95e | SQL | LitvinovRS/Calendar_diplom | /127_0_0_1.sql | UTF-8 | 5,730 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Май 06 2020 г., 11:50
-- Версия сервера: 5.6.43
-- Версия PHP: 7.0.33
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
1bf5038a35c6b03fe904e16684bc2e5556b76783 | SQL | AdamMisiak/SQL_queries | /LEFT_JOIN_task.sql | UTF-8 | 164 | 3.171875 | 3 | [] | no_license | SELECT
film.film_id,
film.title,
inventory_id
FROM
film
LEFT JOIN inventory ON inventory.film_id = film.film_id
WHERE
inventory.film_id IS NULL; | true |
6536fbc57d717e7058e749bceac55606cf48ad2f | SQL | bellmit/origin | /family_order/sql/TM_A_GROUP_BILL/SEL_ONCEFEE.sql | UTF-8 | 422 | 2.6875 | 3 | [] | no_license | SELECT accept_date,group_id,para_code1,decode(substr(feeitem_code,1,1),'0',substr(feeitem_code,2,1),feeitem_code)feeitem_code ,to_char(fee) fee,to_char(acct_id) acct_id ,to_char(operate_time,'yyyy-mm-dd hh24:mi:ss') operate_time,operate_eparchy_code,operate_city_code,operate_depart_id,operate_staff_id
FROM ts_a_group... | true |
2eeafe02a7d5a18bea738e6a4015276a5c11a2e5 | SQL | Tanaka0127/TrainingManagement | /TrainingManagement/DataBase/foreign_key.sql | UTF-8 | 1,131 | 2.59375 | 3 | [] | no_license | ALTER TABLE `ma_user` ADD CONSTRAINT `fk_user_department` FOREIGN KEY (`no_department`) REFERENCES `ma_department`(`no_department`);
ALTER TABLE `ma_training` ADD CONSTRAINT `fk_teacher` FOREIGN KEY (`no_teacher`) REFERENCES `ma_user`(`no_user`);
ALTER TABLE `tr_text_order` ADD CONSTRAINT `fk_order_training` FOREIGN ... | true |
c31cf6d0188a887d0f4b396646c33f3e2b9f7101 | SQL | ogen-project/ogen | /trunk/OGen-Kick/db/Kick-DBModel-PostgreSQL/table-FRM_UserAnswer.postgresql.sql | UTF-8 | 586 | 2.6875 | 3 | [] | no_license | CREATE TABLE "FRM_UserAnswer" (
"IFUser" bigint NOT NULL,
"IFAnswer" bigint NOT NULL,
"IFUser__audit" bigint NULL,
"Date__audit" timestamp with time zone NULL
)
WITH (OIDS=FALSE);
COMMENT ON TABLE "FRM_UserAnswer" IS NULL;
COMMENT ON COLUMN "FRM_UserAnswer"."IFUser" IS 'psql:bigint;sqlserver:bigint;';
COMMENT ON ... | true |
2c7b5e0ba9f753c6a98425257ca06e0a0e3827e4 | SQL | ddt-sawa/sql_drill_sawa | /2-3_question4.sql | UTF-8 | 1,197 | 4.4375 | 4 | [] | no_license | /*2-3 問4 以下は、書籍目次テーブル(contents)から現在のコンテンツコードと前のコンテンツコードを、
現在のコンテンツコードについて昇順で取り出すためのSQLですが、誤りが2点あります。
誤りを指摘してください。*/
--取得列
SELECT
--ひとつ前に参照したコンテンツコード
PreviousTable.c_id AS 前のページ,
--現在参照中のコンテンツコード
CurrentTable.c_id AS 現在のページ
--参照テーブル
FROM
--現在のコンテンツコードを取り出すテーブル
contents AS CurrentTable
--①内部結合なので、OUTER JOIN... | true |
9130bfd7669b4ed74d91023cd4a490f7b778b3bf | SQL | aldemarg911/conf_migra | /MIGRACION/CONF_SINIESTROS/38_Mig_sin_tram_valpret_v01.sql | ISO-8859-1 | 5,473 | 2.703125 | 3 | [] | no_license | DECLARE
/******************************************************************************
NOMBRE: 38_Mig_sin_tram_valpret_v01.sql
PROPSITO: Procedimiento que ejecuta carga de MIG_SIN_TRAM_VALPRET - PRODUCCION
REVISIONES:
Ver Fecha Autor Descripcin
-------... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.