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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
59e06989524d3646e4a74de777a16e26574354d9 | SQL | gaspard-lonchampt/classes-php | /job03/classes.sql | UTF-8 | 4,015 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:3306
-- Généré le : lun. 14 déc. 2020 à 09:58
-- Version du serveur : 5.7.24
-- Version de PHP : 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
de2f81c4368e6a3917648ca69023b4dce665e48e | SQL | GordinV/buh70 | /sql/raama/create_table_docs.sql | UTF-8 | 1,072 | 3.625 | 4 | [] | no_license | DROP TABLE IF EXISTS docs.doc;
CREATE TABLE docs.doc (
id SERIAL,
created TIMESTAMP DEFAULT now(),
lastupdate TIMESTAMP DEFAULT now(),
doc_type_id INTEGER,
bpm JSONB,
history JSONB,
status INTEGER DEFAULT 0,
CONSTRAINT docs_pkey PRIMARY KEY (id)
)
W... | true |
37f9085d90918bfef7af290a0cb24e7798c7d663 | SQL | OscarLopezEns/oracle | /tbs_check.sql | UTF-8 | 1,988 | 3.515625 | 4 | [
"MIT"
] | permissive | -- ===============================================-=-=-
-- Softtek Confidential
--
-- Disclaimer
-- The contents of this document are property
-- of Softtek, and are for internal use only.
-- Any reproduction in whole or in part is strictly
-- prohibited without the written permission
-- of Softtek®. This document is ... | true |
658a0b8c0b2c4974c77da7cbebc9500ff40dba8e | SQL | akura-co/stebeneva.ru | /db.sql | UTF-8 | 580 | 3.28125 | 3 | [] | no_license | create database `stebeneva.ru`;
use `stebeneva.ru`;
create user 'stebeneva.ru'@'localhost' identified with mysql_native_password by '';
grant all on `stebeneva.ru`.* to 'stebeneva.ru'@'localhost';
grant file on `stebeneva.ru`.* to 'stebeneva.ru'@'localhost';
create table section (
id bigint primary key auto_increm... | true |
565fc98211951e3b145ff42137802d4d3b11d3ac | SQL | Lodewikes/CS50X | /problemSets/pset7/movies/10.sql | UTF-8 | 243 | 3.578125 | 4 | [] | no_license | SELECT DISTINCT people.name FROM people
JOIN directors on people.id = directors.person_id
JOIN movies on movies.id = directors.movie_id
JOIN ratings on movies.id = ratings.movie_id
WHERE ratings.rating >= "9.0"
GROUP BY directors.person_id;
| true |
c6b746d6b4c38857a1c08e94494285306f5c7ce7 | SQL | Xeladaren/sms-web-interface | /database/test-data.sql | UTF-8 | 4,459 | 2.59375 | 3 | [] | no_license | use `webSMS` ;
TRUNCATE `webSMS`.`sms`;
INSERT INTO `webSMS`.`sms` (`sms_type`, `sms_date`, `sms_number_type`, `sms_number`, `sms_msg`) VALUES (
0,
'2020-03-23 15:13:00',
'91',
'+33012344567',
'Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Pellentesque hendrerit auctor finib... | true |
bbd21df5928701b3f31e5b90f53a7b25eabd33dd | SQL | Alagiavanan/Relational-Database-Support-for-Data-Warehouse | /Assignment_3/Query1.sql | UTF-8 | 533 | 4.3125 | 4 | [] | no_license |
--Query 1: Ranking within the entire result
--Use the RANK function to rank customers in descending order by the sum of extended cost for shipments (transaction type 5).
--You should use the entire result as a single partition. The result should include the customer name, sum of the extended cost, and rank.
select ... | true |
ac096241e8c4ee9925b3d379db998c154d81b2db | SQL | intfloat/AlgoSolutions | /leetcode/database/ConsecutiveNumbers.sql | UTF-8 | 183 | 3.28125 | 3 | [] | no_license | # Write your MySQL query statement below
select DISTINCT(g1.Num)
from Logs g1, Logs g2, Logs g3
where g1.Id + 1 = g2.Id and g2.Id + 1 = g3.Id and g1.Num = g2.Num and g2.Num = g3.Num;
| true |
ba93b1a402f00373592f48b0d37e1cd484e326eb | SQL | KyleTodd/DBF_PartD | /Part_D.sql | UTF-8 | 6,887 | 4.0625 | 4 | [] | no_license | /* (Database Fundamentals, Assignment Part D, Spring 2017 */
/* First author's name: Al */
/* First author's email: 113406@UTS.EDU.AU*/
/* Second author's name: Fahimeh */
/* Second author's email: Fahimeh.Ramezani@UTS.EDU.AU*/
/* script name: dbpizza_Revised.SQL */
/* purpose: Builds PostgreSQL tables for Pizza da... | true |
dda4f326f494893ec539d4046873ad2698b199a1 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day27/select0550.sql | UTF-8 | 264 | 2.921875 | 3 | [] | no_license |
SELECT sen.name
FROM SENSOR sen, SENSOR_TYPE st, COVERAGE_INFRASTRUCTURE ci
WHERE sen.SENSOR_TYPE_ID=st.id AND st.name='WeMo' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['4065','2100_7','3100_6','3234','3099','3002','5228','6044','2051','4234'])
| true |
a24fbf6642f7208e7f14fe8c7eaf88eb01bcd752 | SQL | successbloger1/devschool.pro | /dz15/ads_db.sql | UTF-8 | 1,761 | 3.28125 | 3 | [] | no_license | -- Adminer 4.2.4 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `ads`;
CREATE TABLE `ads` (
`id` varchar(20) NOT NULL,
`private` tinyint(1) NOT NULL DEFAULT '0',
`seller_name` varchar(20) NOT NULL,
`email` varchar(2... | true |
6d330302041c9d72427c38f09aca2cbe28a9f9e8 | SQL | captainkirk854/project-BigGym | /backend/BIGGYM/api/util/fnStrIsNumeric.sql | UTF-8 | 2,114 | 3.703125 | 4 | [] | no_license | use BIGGYM;
drop function if exists strisnumeric;
delimiter $$
create function strisnumeric (inputString varchar(1024))
returns boolean
begin
-- Configurable ..
declare decimalPoint char(1) default '.';
declare powerOf char(1) default 'E';
declare regExpCharacters varchar(512) default '[.+.] [.-... | true |
4a68f6e3a551e20960bba6ba7db557ac038c2c87 | SQL | AnanduR32/FSD_Learning | /Week 6/SQL/groupby_having_1.sql | UTF-8 | 713 | 3.21875 | 3 | [] | no_license | create table Test9_emp (
id int identity,
[name] varchar(5),
dept varchar(15),
salary numeric(15)
)
insert into Test9_emp values
('A', 'qwerty',2412), ('B', 'qwerty', 554), ('C','ascii',2342),
('D','tranquil',632), ('E','polyb',3745), ('AC','ascii',1323),
('AV','polyb',726), ('BW','polyb',6542), ('CE','asc... | true |
eeb38ec9623511e1643edcd66c76a2207285194e | SQL | palashvsid/UC_Codes | /Data_Management/HW2_Siddamsettiwar_Palash_Vinay.sql | UTF-8 | 5,032 | 4.40625 | 4 | [] | no_license | Use UC;
select * from dbo.ChicagoSalary;
--Homework #2 Query from A Single Table
/*--------------------------------------------------------------------------------------
Instructions:
You will need to import the data for Chicago Salary in order to complete this assignment.
The Chicago Salary tabe should ... | true |
a709b41706a246f694725a8a058d73984c5c41d7 | SQL | ahueteg/Datamart-MKT | /Lab SQL/QS/update_qs_sta.sql | ISO-8859-10 | 3,413 | 3.359375 | 3 | [] | no_license | DELETE FROM mkt.st_qs_1;
DELETE FROM mkt.st_qs_2;
insert INTO mkt.st_qs_1
SELECT
[GRUPO_ARTICULO]
,[Codigo_SAP]
,[COD_PROV]
,[NOMPROD]
,[CD_CENTRO]
,[CD_ALMACEN]
,[Stock_Especial]
,[Num_Stock_Especial]
,[LOTE]
,CASE WHEN len([CANT_01])=12 THEN CAST(SUBSTRING([CANT_01],... | true |
39c55953f14b87f7b488eade13f72e9955319fcc | SQL | endeavourhealth-discovery/getFHIRRecordAPI | /database/PopulateCodeCategories/10) Dental_disorder.sql | UTF-8 | 2,843 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive |
insert into code_category_values (code_category_id, concept_dbid)
SELECT distinct 10, s.dbid-- , s.id, s.name, p2.id, p2.name, i.id, i.name, p.id, p.name, c.id, c.name
FROM concept c -- Source SNOMED concept
JOIN concept p ON p.id = 'SN_116680003' -- "Is A" relationship (child of code)
JO... | true |
551663489da69b7639ed271ace2c922798a1ff99 | SQL | MartinRavanov72/Softuni | /Java DB/Database Basics – MySQL/Database Programmability - Exercise/13. Withdraw Money.sql | UTF-8 | 336 | 3.265625 | 3 | [] | no_license | CREATE PROCEDURE usp_withdraw_money(account_id INT, money_amount DECIMAL(17, 4))
BEGIN
START TRANSACTION;
IF money_amount <= 0 OR (SELECT a.balance FROM accounts AS a WHERE a.id = account_id) < money_amount THEN
ROLLBACK;
ELSE
UPDATE accounts AS a
SET a.balance = a.balance - money_amount
WHERE a.id = account_... | true |
d43e1445324ac0bd8b2a6cf080f6347402374730 | SQL | Mosh333/Web-Development | /TMA_2/part2/createEducordTables.sql | UTF-8 | 2,921 | 3.328125 | 3 | [] | no_license | -- run the below command to initialize the database
-- source /home/moshiurho/public_html/Comp466_Assignment2/part2/createEducordTables.sql;
use moshiurho;
-- Bypass dependencies, delete educordCourseContent at end
DROP TABLE IF EXISTS educordUserList;
DROP TABLE IF EXISTS educordAnnouncements;
DROP TABLE IF EXISTS ed... | true |
69e086c8227cfb59d5f41cd31a82f5ba4455a76c | SQL | MarioVasilev99/CSharp-DB-September-2019 | /Databases Basics - MS SQL Server/Data Definition and Datatypes/04.CarRentalDB.sql | UTF-8 | 2,585 | 4 | 4 | [] | no_license | --TASK 14
CREATE DATABASE CarRental
CREATE TABLE Categories(
Id INT IDENTITY(1,1) PRIMARY KEY,
CategoryName VARCHAR(30) NOT NULL,
DailyRate INT NOT NULL,
WeeklyRate INT NOT NULL,
MonthlyRate INT NOT NULL,
WeekendRate INT NOT NULL
);
INSERT INTO Categories
VALUES
('Mini Car', 10, 60, 250, 15),
('Economy Ca... | true |
691b90228603b418097e987c2e2b903a681c63ce | SQL | chenkaibin/ovirt-engine | /packaging/dbscripts/create_tables.sql | UTF-8 | 186,898 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | --
-- PostgreSQL database dump
--
--
-- Name: all_cluster_usage_rs; Type: TYPE; Schema: public; Owner: engine
--
CREATE TYPE all_cluster_usage_rs AS (
quota_cluster_id uuid,
quota_id uuid,
cluster_id uuid,
cluster_name character varying(40),
virtual_cpu integer,
virtual_cpu_usage integer,
mem_size_mb bigint,
... | true |
9b0623b84aca602b3c66fa64399756d1c2ef0856 | SQL | npenate/social-restaurant-booking-api | /src/main/resources/db/migration/V5__Add_zip_code_to_restaurant_table_diner.sql | UTF-8 | 421 | 3.09375 | 3 | [] | no_license | ALTER TABLE tables
ADD COLUMN zip_code text NOT NULL,
ADD COLUMN location point NOT NULL;
CREATE INDEX zip_code_tables_idx ON tables(zip_code);
ALTER TABLE restaurants
ADD COLUMN zip_code text NOT NULL,
ADD COLUMN location point NOT NULL;
CREATE INDEX zip_code_restaurants_idx ON restaurants(zip_code)... | true |
3f683ff9faf295e8418e126e49364d361f3dfa8f | SQL | aleksanderLisiecki/php_HelloWorld | /magazynpinio.sql | UTF-8 | 3,875 | 2.890625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Czas generowania: 05 Lut 2020, 14:13
-- Wersja serwera: 10.4.11-MariaDB
-- Wersja PHP: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARA... | true |
3eddd4b2fc1d0e75843a001719ed9829d54cd994 | SQL | artem-yam/sqlTasks | /13.1.sql | UTF-8 | 1,488 | 4.28125 | 4 | [] | no_license | --13.1
CREATE OR REPLACE PROCEDURE GreatestOrders
(order_date IN VARCHAR2,
orders_amount IN NUMBER)
IS
rows_output NUMBER(38,0);
employee_name VARCHAR2(40 BYTE);
order_id NUMBER(38,0);
order_cost NUMBER(38,5);
CURSOR C1 IS
SELECT "Employee name",
"Order",
... | true |
1a857c5d3f9a747a47b1132aa59ce9cc7faf818d | SQL | SMcCalden/SMcCWishList | /sites/dynamic.sql | UTF-8 | 986 | 3.515625 | 4 | [] | no_license | -- create database for the dynamic site
CREATE DATABASE IF NOT EXISTS dynamic;
-- create a new user for the Web app
DELETE FROM mysql.user WHERE User = 'webuser';
CREATE USER 'webuser'@'%' IDENTIFIED BY 'vagrantrocks';
-- grant only the necessary privileges to our new user
GRANT SELECT, INSERT, UPDATE, DELETE ON dyna... | true |
9c7a78773bd3e6aed2f161e5328060e970ef3bd1 | SQL | hrybrn/ecssweb | /db/table/voting.sql | UTF-8 | 1,265 | 3.546875 | 4 | [
"Apache-2.0"
] | permissive | create table electionType (
electionTypeID INTEGER PRIMARY KEY AUTOINCREMENT,
electionName VARCHAR(255),
electionDescription VARCHAR(255)
);
create table position (
positionID INTEGER PRIMARY KEY AUTOINCREMENT,
electionTypeID INTEGER,
positionName VARCHAR(255),
description VARCHAR(255),
... | true |
55a2ee5eaef799372f91799e9abddf69485b5a73 | SQL | Y-J-Hu/ck_8_20 | /ck_8_20/public/data/data.sql | UTF-8 | 7,573 | 2.953125 | 3 | [] | no_license | //猜你喜欢
create database ck charset=utf8;
use ck;
create table ck_product(
pid int primary key auto_increment,
pname varchar(2000),
price varchar(200),
pic varchar(2000),
pcount double(10,2),
ptime datetime
);
insert into ck_product values(null,"产品类岗位职责","免费",'f1_08.jpg',12.7,now());
insert into c... | true |
f23f0754968638cf5421c6844b4c2191808316bd | SQL | birendraa/healthProj | /Vidavo/src/Database/VidavoSQLScript.sql | UTF-8 | 20,820 | 3.0625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : test
Source Server Version : 50141
Source Host : localhost:3306
Source Database : vidavo
Target Server Type : MYSQL
Target Server Version : 50141
File Encoding : 65001
Date: 2010-03-18 19:44:06
*/
SET FOREIGN_KEY_CHECKS... | true |
fa9b248ff1e766679aca10e1e4529469a50d9404 | SQL | bigdata1712/SQL04 | /SQL04/SQL04.sql | UTF-8 | 2,243 | 4.65625 | 5 | [] | no_license | /*
문제1.
평균 급여보다 적은 급여을 받는 직원은 몇 명이나 있습니까?
//56명
*/
select count(salary)
from employees
where salary < (select avg(salary)
from employees);
/*
문제2.
각 부서별로 최고의 급여를 받는 사원의 직원번호(employee_id), 성(last_name)과 급여(salary)
부서번호(department_id)를 조회하세요 단 조회결과는 급여의 내림차순으로 정렬되어 나타나야 합니다.
//11명 ... | true |
ac4ed45a1cb95400f89ab7a6174744c91d013c7f | SQL | Sudharshana-V/Claims-Management-System | /MemberMicroservice/src/main/resources/data.sql | UTF-8 | 4,173 | 3.34375 | 3 | [] | no_license | /* Policy Table*/
DROP TABLE IF EXISTS policy;
create table policy(policy_id int,policy_number int,benefit_id int,premium double,tenure int);
insert into policy (policy_id,policy_number,benefit_id,premium,tenure) values(1,101,201,5000.0,25);
insert into policy (policy_id,policy_number,benefit_id,premium,tenure) values... | true |
ef0f9860350a84476447b4356638a1d306060543 | SQL | Reideh17/reservi | /data-base/reservi.sql | UTF-8 | 3,107 | 3.28125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Nov 08, 2021 at 01:55 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
7cfbab25c5bd22ef5b3b5e01853921199096ffba | SQL | whylu/spring-cloud | /wallet-service/src/main/resources/db/h2/init-embedded.sql | UTF-8 | 964 | 3.40625 | 3 | [] | no_license | DROP TABLE IF EXISTS wallet;
DROP TABLE IF EXISTS wallet_change_log;
CREATE TABLE IF NOT EXISTS wallet (
id serial PRIMARY KEY,
username varchar(32) NOT NULL,
currency varchar(4) NOT NULL,
amount double PRECISION DEFAULT 0,
frozen double PRECISION DEFAULT 0
);
CREATE UNIQUE INDEX IF NOT EXISTS idx_username ON wal... | true |
64f56f85bc8778dff65964f41218ce1acec55c1a | SQL | PicassosHair/stevejobs | /sql/load_applications.sql | UTF-8 | 4,410 | 3.625 | 4 | [] | no_license | -- This template script will read applications file generated by the go package and load to mysql database
DROP TABLE IF EXISTS temp_Applications;
-- The temp table has no constraints whatsoever, and is a subset of the Applications table.
CREATE TABLE IF NOT EXISTS `temp_Applications` (
`applId` VARCHAR(30) NOT NULL,... | true |
ee25b94dc7d2061b15161586ec9f0a553aac3b30 | SQL | bilalmarifet/DatabaseMidTermProject | /FacebookDB/CHECKCONSTRAINTDACEBOOK.sql | UTF-8 | 406 | 2.90625 | 3 | [] | no_license |
ALTER TABLE ADDFRIEND ADD CONSTRAINT SAMEUSERCANNOTADDNEW CHECK (AddUserID <> ReceiverUserID)
ALTER TABLE ADDFRIEND
WITH CHECK ADD CONSTRAINT ISADDFRIEND
CHECK ('False'=dbo.IsThereFriendRequest(AddUserId,ReceiverUserID))
ALTER TABLE PAGEADMIN
WITH CHECK ADD CONSTRAINT ISANYMOD
CHECK (0=dbo.IsT... | true |
a77f9d8c5f22af69a2e8c7ed6adf987fb485641a | SQL | fetus-hina/okeihan-now | /sqls/15_dia_tables.sql | UTF-8 | 1,164 | 3.828125 | 4 | [
"MIT"
] | permissive | CREATE TABLE "dias" (
"id" INTEGER NOT NULL PRIMARY KEY,
"type_id" INTEGER NOT NULL REFERENCES "types" ( "id" ),
"weekday" BOOLEAN NOT NULL,
"holiday" BOOLEAN NOT NULL,
"number" VARCHAR(6) NOT NULL, -- "A1200Z"
"starting_station_id" INTEGER NOT NULL REFE... | true |
967a93b9610446b4140fbe04acd8ec92b155b38d | SQL | edjdc/controle-ambiental | /oauth2-server/src/main/resources/db/migration/V3__create-tables-user-authorities.sql | UTF-8 | 284 | 2.78125 | 3 | [] | no_license | CREATE TABLE users (
id INT PRIMARY KEY,
username VARCHAR(256) UNIQUE NOT NULL,
password VARCHAR(256) NOT NULL,
enabled smallint NOT NULL
);
CREATE TABLE authorities (
username VARCHAR(256) NOT NULL,
authority VARCHAR(256) NOT NULL,
PRIMARY KEY(username, authority)
); | true |
9eb718de0eb873a9cf08874441bd5e84e04b018a | SQL | it-yudharta/peminjaman-lcd | /src/main/resources/db/migration/V1__products.sql | UTF-8 | 241 | 2.59375 | 3 | [
"MIT"
] | permissive | CREATE TABLE `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`kode` varchar(25) DEFAULT NULL,
`nama` varchar(50) DEFAULT NULL,
`status` enum('ADA','KELUAR') DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
| true |
92dc560f23d6cde5831c0094c68c44c0058894a2 | SQL | tallmikey/big_data_training | /tallmike/BDB_Module 5 - Demo_01_hive_acid_demo.sql | UTF-8 | 2,260 | 3.875 | 4 | [] | no_license | set hive.support.concurrency = true;
set hive.enforce.bucketing = true;
set hive.exec.dynamic.partition.mode = nonstrict;
set hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
set hive.compactor.initiator.on = true;
set hive.compactor.worker.threads = 1;
CREATE DATABASE acid_demo;
use aci... | true |
5c34274218ab86866798a92d02a6cde9ce931870 | SQL | iqbal89co/staycation_crowd | /database/staycation_crowd.sql | UTF-8 | 3,082 | 3.109375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 03, 2021 at 10:00 AM
-- Server version: 8.0.25-0ubuntu0.20.04.1
-- PHP Version: 8.0.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_S... | true |
4839c76b32689f9f3c007ef3e88618288c6ae32b | SQL | AnilKumar01/banksystem_database_v1.0.0.1 | /data/bank_system_dummy_data.SQL | UTF-8 | 2,837 | 2.546875 | 3 | [] | no_license | INSERT INTO BANK_SERVICES(SERVICE_CODE, SERVICE_NAME) VALUES
("OAA", "ACCOUNT OPENING"),
("OCA", "APPLY CREDIT CARD");
INSERT INTO DESKTOP_APP_USERS (USERNAME, PASSWORD, ACCOUNT_LEVEL, ACCOUNT_STATUS) VALUES
("ANIL@CLERK", AES_ENCRYPT("cdacacts", "6575"), "CLERK", "UNLOCKED"),
("PRANAV@ADMIN", AES_ENCRYPT("cdacacts", ... | true |
f19899c56c85918e9ab64c27c9e8288f879b978e | SQL | dongxiaozhen/lbbNote | /sql/mysql/sampdb/misc/missing_scores.sql | UTF-8 | 395 | 3.859375 | 4 | [] | no_license | # find students who haven't taken a test or quiz
SELECT
student.name, student.student_id,
grade_event.date, grade_event.event_id, grade_event.category
FROM
student INNER JOIN grade_event
LEFT JOIN score ON student.student_id = score.student_id
AND grade_event.event_id = score.event_id
WHERE
... | true |
ec423c4dd0279522329a880eab6df96444ba1cf0 | SQL | georgales/sql | /lesson1.9.num.string.functions/exercise01.sql | UTF-8 | 243 | 3.890625 | 4 | [] | no_license | SELECT o.orderNumber, c.customerName, ROUND(SUM(quantityOrdered*priceEach)) AS item_price
FROM orders o
JOIN customers c ON o.customerNumber = c.customerNumber
JOIN orderdetails od ON o.orderNumber = od.orderNumber
GROUP BY o.orderNumber | true |
5413c41023758cc05e81f9e279a52dd2d978a4f6 | SQL | 2bleO/vet-clinic | /schema.sql | UTF-8 | 2,249 | 4.40625 | 4 | [] | no_license | /* Database schema to keep the structure of entire database. */
CREATE TABLE animals (
id INT GENERATED ALWAYS AS IDENTITY,
name VARCHAR(50),
date_of_birth DATE,
escape_attempts INT,
neutered BOOLEAN,
weight_kg DECIMAL
);
ALTER TABLE animals ADD COLUMN species VARCHAR(100);
/* Create a table ... | true |
ab9abc64be0a3dafa499e3421cf893670846dbc9 | SQL | XingXing2019/LeetCode | /Database/LeetCode 618 - StudentsReportByGeography/StudentsReportByGeography_MySQL.sql | UTF-8 | 351 | 3.9375 | 4 | [] | no_license | with cte as (select *, row_number() over(partition by continent order by name) as row_id from student)
select max(case when continent = 'America' then name else null end) as 'America',
max(case when continent = 'Asia' then name else null end) as 'Asia',
max(case when continent = 'Europe' then name else null end) as 'E... | true |
58f9d4965ada8a38208c5ddc2a7f42a940d337b3 | SQL | romanmarkman/Java-Assignment | /comp3095-update.sql | UTF-8 | 15,278 | 3.390625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 04, 2018 at 03:17 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
07ae7e6c313e6c70db4822587e2385f28834d10d | SQL | guilherme-maegava/fhir-simple-rdbms | /scripts/create_ddl.sql | UTF-8 | 2,110 | 3.546875 | 4 | [] | no_license | CREATE SCHEMA fhir AUTHORIZATION "admin";
SET search_path = fhir;
CREATE TABLE fhir.patient (
id int8 NULL,
payload jsonb NULL,
CONSTRAINT patient_pk PRIMARY KEY (id)
);
CREATE SEQUENCE fhir.patient_id_seq
INCREMENT BY 1
MINVALUE 1
MAXVALUE 9223372036854775807;
ALTER TABLE fhir.patient ALTER COLUMN id SET DEF... | true |
db4a6578aa8e057ae68eb297d5327c237e813d3e | SQL | ewingcode/ball | /sql/init.sql | UTF-8 | 14,795 | 3.203125 | 3 | [] | no_license | /*
SQLyog v10.2
MySQL - 5.1.30-community : Database - ball
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_... | true |
0390cbaec2bf150b5e7b17658d0554b9713f3bef | SQL | svan001/site-bsmt | /src/main/resources/db/migration/V3_0_11__16_11_20_news_domination_kut.sql | UTF-8 | 2,205 | 3.578125 | 4 | [] | no_license | /**
* ## TODO :
*
* 1. Domination KUT : titre de la news
* 2. 2016-11-20 : '2016-MM-DD' date le news (danger du sysdate ! )
* 3. 12 : ID de la gallery (last + 1)
* 4. Domination KUT : titre de la gallery
* 5. end : photo présente en fin de news
* 6. Compléter la Galerie Domination KUT du 20/11/2016 et BSMT, L... | true |
174a4a1f8fef41ef17467098161000066cff38ed | SQL | bazizyacine/mysql-labs | /Samples/Passing_Parameters_lab.sql | UTF-8 | 219 | 2.796875 | 3 | [] | no_license | USE CAVE_TEST;
show tables;
select * from books;
DELIMITER $$
CREATE PROCEDURE `ShowBooks`(in maxId int)
begin
select * from books where id < maxId;
end$$
DELIMITER ;
call ShowBooks(4);
drop procedure ShowBooks;
| true |
807b8fe62f25bacf622a7766aa4dcb9b89eda6f1 | SQL | DrodiDui/ComputerShop | /backend/src/main/resources/db/migration/V1_2__create_products_tables.sql | UTF-8 | 2,533 | 3.796875 | 4 | [] | no_license | create table if not exists `products`
(
`id` bigint not null auto_increment,
`product_name` varchar(50) not null,
`description` varchar(255) not null,
`price` int not null,
`model` varchar(100) not null,
`brand` ... | true |
7a12afe414257efa2dc4ae07708ca410d0fc82b7 | SQL | stdevi/Hotel | /hotelDump/hotel_apartments.sql | UTF-8 | 3,084 | 3.25 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `hotel` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `hotel`;
-- MySQL dump 10.13 Distrib 5.7.18-ndb-7.6.3, for Linux (x86_64)
--
-- Host: localhost Database: hotel
-- ------------------------------------------------------
-- Server version 5.7.18-ndb-7.6.3
/*!40101 SET @OLD_CHARACTER... | true |
19cb0ddbbd960e1a9fa47d919451f09458394769 | SQL | JavaCodeMood/playdemo2 | /public/db/user.sql | UTF-8 | 991 | 2.703125 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MySql
Source Server Version : 50527
Source Host : localhost:3306
Source Database : test
Target Server Type : MYSQL
Target Server Version : 50527
File Encoding : 65001
Date: 2017-08-02 04:12:45
*/
SET FOREIGN_KEY_CHECKS=... | true |
4690ac0c93e39519888fa57210d8d671d037b328 | SQL | dilpreet92/pg_chameleon | /sql/upgrade/cat_0.8.sql | UTF-8 | 512 | 3.296875 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | CREATE OR REPLACE VIEW sch_chameleon.v_version
AS
SELECT '0.8'::TEXT t_version
;
CREATE TABLE sch_chameleon.t_index_def
(
i_id_def bigserial NOT NULL,
i_id_source bigint NOT NULL,
v_schema character varying(100),
v_table character varying(100),
v_index character varying(100),
t_create text,
t_drop tex... | true |
1e3dadcc49300bed128de92c4406317fba04fdd6 | SQL | fleetmack/mines | /Oracle/oua-0260/imports_exports/backup_import_tables/_recompile_wb_vol_procedures.sql | UTF-8 | 924 | 2.515625 | 3 | [] | no_license | /********************************/
/********************************/
/*** Recompiles Wb Procedures ***/
/********************************/
/********************************/
/*** Update Runtimes ***/
INSERT INTO ADVANCE.a_dw_runtimes
VALUES
('Start','Recompile a_wb_vol procedures',TO_CHAR(SYSDATE, 'YYYYMMDD:... | true |
2ff201cfb43ccb4bdef61ccb5cce6864fc01700a | SQL | skiwheelr/umuc | /SDEV350_DBSecurity/week5profileTS.sql | UTF-8 | 834 | 2.9375 | 3 | [] | no_license | CREATE PROFILE myprofile4 LIMIT
FAILED_LOGIN_ATTEMPTS 5
PASSWORD_LOCK_TIME 1;
CREATE TABLESPACE myumuctablespace4;
CREATE USER mytestuser4
IDENTIFIED BY pwd4user
DEFAULT TABLESPACE myumuctablespace4
PROFILE myprofile4;
--DELETE PROFILE myprofile3;
--DELETE TABLESPACE myumuctablespace3;
-... | true |
987a446bee5d31d14cd4b5db41035d5dc1ff0129 | SQL | hqottsz/MXI | /assetmanagement-database/src/upgrade/plsql/lib/liquibase/7/2/4/0/sql/MX-18059.sql | UTF-8 | 13,230 | 2.90625 | 3 | [] | no_license | --liquibase formatted sql
--changeSet MX-18059:1 stripComments:false endDelimiter:\n\s*/\s*\n|\n\s*/\s*$
/********************************************************************************
* This package holds shift specific pl/sql functions and procedures.
**************************************************************... | true |
a74c539b8107bf12d0d169aa9843e09d9bd7554e | SQL | hajiratasneem/medical-necessity | /Samples/Cardiac Catherization/cqls/Catheterization.cql | UTF-8 | 8,936 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | library Catheterization
using FHIR version '3.0.0'
include FHIRHelpers version '3.0.0' called FHIRHelpers
codesystem "ICD-10-CM": 'http://hl7.org/fhir/sid/icd-10-cm'
codesystem "ICD-9-CM": 'http://hl7.org/fhir/sid/icd-9-cm'
codesystem "LOINC": 'http://loinc.org'
codesystem "HCPCS": 'https://hcpcs.codes/'
codesystem "S... | true |
31847d3367bae2c6480e5aea2493a1d28b98524c | SQL | altamira/vstfs | /Tatva/activiti/purchase-order-process/ddl/PURCHASE_PLANNING_ITEM.sql | UTF-8 | 3,108 | 3.390625 | 3 | [] | no_license | --------------------------------------------------------
-- File created - Wednesday-February-19-2014
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table PURCHASE_PLANNING_ITEM
--------------------------------------------------------
... | true |
05c8683606bb51c162e95a3f93e691bb97b0daec | SQL | mqcabailo/CMSC100pinterest | /backend/database/schema.sql | UTF-8 | 1,723 | 3.921875 | 4 | [] | no_license | DROP DATABASE IF EXISTS pinterest;
CREATE DATABASE pinterest;
USE pinterest;
CREATE TABLE IF NOT EXISTS user (
user_id BIGINT AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(64) UNIQUE NOT NULL,
password VARCHAR(128) NOT NULL,
username VARCHAR(64) NOT NULL
);
CREATE TABLE IF NOT EXISTS board (
board_id BIGINT AUTO_IN... | true |
880232635c8f9c54b7ecaf3837ad24753fbc7ae0 | SQL | ihaku4/leetcode | /customers_who_never_order.sql | UTF-8 | 105 | 2.703125 | 3 | [] | no_license | select Name from Customers
left join Orders
on Customers.Id = Orders.CustomerId
where Orders.Id is null;
| true |
a4d711b9ea3c10869afcb62d22dd9a4c010f7c06 | SQL | maikale/Hellground_database | /updates/world/old/HG_9033_DB_622.sql | UTF-8 | 11,253 | 3.125 | 3 | [] | no_license | -- Pyrewood village rework by Firehex and Sand.
-- Now when event "Nights" start human npc despawn and appear worgens instead, some npc(in human form) sell items, added casts, remove elite status(was made around 2.4.0).
SET @GUID := (SELECT MAX(guid) FROM creature);
-- !!! @GUID := @GUID+1 the only right decision for I... | true |
e9b4d60a695fc55372c2dfcd8b42ea59313b6feb | SQL | hxin/OntoSuite-Miner | /lib/ensembl-api/ensembl-variation/modules/t/test-genome-DBs/homo_sapiens/core/exon.sql | UTF-8 | 578 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE `exon` (
`exon_id` int(10) unsigned NOT NULL auto_increment,
`seq_region_id` int(10) unsigned NOT NULL default '0',
`seq_region_start` int(10) unsigned NOT NULL default '0',
`seq_region_end` int(10) unsigned NOT NULL default '0',
`seq_region_strand` tinyint(2) NOT NULL default '0',
`phase` tiny... | true |
d578fc9a44336cb1d88bf7d9e2f0b8f547ef74f3 | SQL | sadouni-khouira/SQL | /A - Niveau -I - Vos premiers pas avec le language SQL et les bases de données/Exercice 4 Analyses/exercice4.sql | UTF-8 | 1,874 | 3.625 | 4 | [] | no_license | 1. La base est vierge. Réalisez l'insertion d'un jeu de données dans les différentes
INSERT INTO typeanalyse (refTypeAnalyse, designation, prixTypeAnalyse)
VALUES
(25,'farine',12.5),
(38,'sucre',15.7),
(60,'lait',4);
tables. Les données seront définies par vous-même à votre convenance.
2. Augmentez de 1... | true |
b87aa0dc80a9b5f71e36637196d9c876a0010047 | SQL | imccarter/App-Academy-Coursework | /SQLite3_exercises/import_db.sql | UTF-8 | 2,578 | 4.0625 | 4 | [] | no_license | DROP TABLE IF EXISTS users;
CREATE TABLE users(
id INTEGER PRIMARY KEY,
fname VARCHAR(255) NOT NULL,
lname VARCHAR(255) NOT NULL
);
DROP TABLE IF EXISTS questions;
CREATE TABLE questions(
id INTEGER PRIMARY KEY,
title VARCHAR(255) NOT NULL,
body VARCHAR NOT NULL,
author_id INTEGER REFERENCES users(id) ... | true |
7b98d7abf2a05f89718dc9a58a23d01c16bd3c25 | SQL | NCIP/catissue-core | /software/caTissue/db/Common/Oracle/DEIntegrationRestructure.sql | UTF-8 | 1,304 | 3.171875 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | create table CATISSUE_STUDY_FORM_CONTEXT (
IDENTIFIER number(19,0) not null,
NO_OF_ENTRIES integer,
primary key (IDENTIFIER)
);
create table CATISSUE_CP_STUDYFORMCONTEXT (
STUDY_FORM_CONTEXT_ID number(19,0) not null,
COLLECTION_PROTOCOL_ID number(19,0) not null,
primary key (STUDY_FORM_CONT... | true |
1fb3b96ed7a1d817698cb997f63d0ae2549329c5 | SQL | doncorley/kpme | /web/src/test/config/sql/DepartmentLunchRuleTest.sql | UTF-8 | 2,018 | 2.921875 | 3 | [] | no_license | --
-- Copyright 2004-2013 The Kuali Foundation
--
-- Licensed under the Educational Community License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.opensource.org/licenses/ecl2.php
--
-- Unless required by ap... | true |
b797cf284a43f6d4686757b37e3e98aa8a355fac | SQL | saulhoward/haddock-cms | /plug-ins/shop/trunk/database/deltas/1213364999.sql | UTF-8 | 435 | 2.515625 | 3 | [] | no_license | -- Delta file for the Shop module
-- (c) 2008-06-13, Robert Impey
CREATE TABLE `hpi_shop_supplier_shipping_prices` (
`id` int(10) unsigned NOT NULL auto_increment,
`supplier_id` int(10) unsigned NOT NULL,
`customer_region_id` int(10) unsigned NOT NULL,
`product_category_id` int(10) unsigned NOT NULL,
`first_... | true |
5670f108dba7b7f1c6bb484f836b0510d68129f1 | SQL | vedk21/mysql_playground | /Advance/Aggregation/avg.sql | UTF-8 | 342 | 3.5625 | 4 | [] | no_license | -- Use database --
USE champions_league;
-- Find the average of a column --
-- SELECT AVG(<COLUMN_NAME>) FROM <NAME_OF_TABLE>;
-- It always returns floating number --
SELECT AVG(won_the_competition) FROM teams;
-- Find the average of each country winning competition --
SELECT country, AVG(won_the_competition) FROM te... | true |
641c0ad48b845b7b398c6bae68e92ee72737e459 | SQL | LacledesLAN/gamesvr-csgo-warmod | /dist/linux/csgo/addons/sourcemod/configs/sql-init-scripts/sqlite/create_admins.sql | UTF-8 | 1,414 | 3.28125 | 3 | [
"Unlicense",
"GPL-3.0-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LicenseRef-scancode-generic-exception",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
CREATE TABLE sm_admins (
id INTEGER PRIMARY KEY AUTOINCREMENT,
authtype varchar(16) NOT NULL CHECK(authtype IN ('steam', 'ip', 'name')),
identity varchar(65) NOT NULL,
password varchar(65),
flags varchar(30) NOT NULL,
name varchar(65) NOT NULL,
immunity INTEGER NOT NULL
);
CREATE TABLE sm_groups (
id ... | true |
fe225db4af160e235bcc66237c4b690b9c64ba9c | SQL | sergiisyrovatchenko/SQLSaturday | /WaitStats/04 - top(20) waits.sql | UTF-8 | 2,788 | 2.703125 | 3 | [] | no_license | /*
SQL Server Wait Types Library
https://www.sqlskills.com/help/waits/
*/
/*
DBCC SQLPERF("sys.dm_os_wait_stats", CLEAR)
*/
SELECT TOP(20) wait_type
, wait_time = CAST(wait_time_ms / 1000. AS DECIMAL(18,4))
, wait_resource = CAST((wait_time_ms - signal_wait_time_ms) / 1000. AS DE... | true |
7d0ed4450dfeb22c4459e8beab36dfb2be384af0 | SQL | 674236876/dingweiService | /src/test/resources/PersonalTerminal.sql | UTF-8 | 1,235 | 2.609375 | 3 | [] | no_license | user `quick4j`
CREATE TABLE `personalTerminal`(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '终端id',
`groupId` bigint(20) DEFAULT NULL COMMENT '组id',
`ptName` varchar(32) DEFAULT NULL COMMENT '终端名称',
`imsi` varchar(32) DEFAULT NULL COMMENT 'imsi',
`phoneNumber` varchar(11) DEFAULT NULL COM... | true |
ee6d294de41d580361ce9e89117cf7ae951b3ac3 | SQL | rockhe168/PracticeCode | /Less/DBDesgin/initTable.sql | GB18030 | 29,329 | 2.890625 | 3 | [] | no_license | /*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2016/5/16 16:30:38 */
/*==============================================================*/
drop table if exists wlt_catalog;
drop table if e... | true |
0570d4e043a2d0a8113b2ec36314ff931ec20139 | SQL | Verojja/veroLib | /Backups/Deployments/FM_BUG_analysis_20190730.sql | UTF-8 | 890 | 2.890625 | 3 | [] | no_license |
SELECT
*
FROM
dbo.FMPendingClaimActivityLog
SELECT NULL AS 'FireMarshalPendingClaim', FireMarshalPendingClaim.isActive, FireMarshalPendingClaim.isCurrent, FireMarshalPendingClaim.dateInserted,
FireMarshalPendingClaim.coverageTypeCode,
FireMarshalPendingClaim.estimatedLossAmount,
FireMarshalPendingCla... | true |
61a28649740719d5b7fea61c01c428394d835455 | SQL | pengsn/tools | /sql/idcard_areacode.sql | UTF-8 | 417,358 | 2.640625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50628
Source Host : localhost:3306
Source Database : skyeye
Target Server Type : MYSQL
Target Server Version : 50628
File Encoding : 65001
Date: 2019-05-14 11:14:57
*/
SET FOREIGN_KEY_C... | true |
33825810d9824d201f32cf3926e81bb819558f86 | SQL | thoidaianhhung/HackerRank | /Type OfTriangles.sql | UTF-8 | 251 | 3 | 3 | [] | no_license | SELECT
CASE
WHEN A + B > C AND B + C > A AND A + C > B THEN
CASE
WHEN A = B AND A = C AND B = C THEN N'Equilateral'
WHEN A = B OR A = C OR B = C THEN N'Isosceles'
ELSE N'Scalene'
END
ELSE N'Not A Triangle'
END AS RESULT
FROM TRIANGLES; | true |
2796bc039c7c7095dd5dde73c4200dee4e810818 | SQL | 1217198284/codingjobs | /ERD_Sol/ERD_3.sql | UTF-8 | 1,651 | 3.828125 | 4 | [] | no_license | CREATE TABLE Film (
ID int(10) NOT NULL,
Language VARCHAR(20) NOT NULL,
Title varchar(255) NOT NULL,
Description varchar(255),
Release_Year int(4),
DirectorID int(10) NOT NULL,
PRIMARY KEY (ID));
CREATE TABLE Film_Actors (
FilmID int(10) NOT NULL,
ActorID int(10) NOT NULL,
... | true |
c7b170dca64657f42d4cd6db8363c7187ba4f8cc | SQL | riy4dul/E-commerce-2 | /My file/new_shop.sql | UTF-8 | 24,580 | 2.828125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 19, 2018 at 08:26 PM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
22e66b01b8552c4245cb544cd370aae0009f2a89 | SQL | Kshitija-patel/Final_Project | /Final_Project/Database/articles_db.sql | UTF-8 | 2,532 | 3.3125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 07, 2019 at 10:02 PM
-- Server version: 5.7.24-log
-- PHP Version: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
83e8cb6b538b199f53f65ab3ff4ab79296d60a1c | SQL | poudus/k2z | /mcts-reset.sql | UTF-8 | 1,309 | 2.609375 | 3 | [] | no_license |
delete from k2s.mcts where id > 99;
update k2s.mcts set visits = 0, score = 0.0, ratio = 0.0;
alter sequence k2s.mcts_sequo restart with 100;
insert into k2s.mcts values (0, 0, -1, -1, '', '', 0.0, 0, 0.0);
insert into k2s.mcts values (1, 1, 0, 24, 'CC', 'CC', 0.0, 0, 0.0);
insert into k2s.mcts values (2, 1, 0, 25,... | true |
e514a930e17e1405ba645e455976359367b4d364 | SQL | phamios/food | /database/food.sql | UTF-8 | 5,071 | 3.171875 | 3 | [
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 24, 2015 at 03:17 PM
-- Server version: 10.0.20-MariaDB-0+deb8u1
-- PHP Version: 5.6.9-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLI... | true |
b1522c857e8d2df2f91e328d14b27ef459092a92 | SQL | Gustibimo/backend | /dao/src/main/resources/life/catalogue/db/data.sql | UTF-8 | 867 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | -- bots
INSERT INTO "user" (key, username, firstname, lastname, roles, created) VALUES
(-1, 'tester', 'Tim', 'Test', '{EDITOR,ADMIN}', now()),
(0, 'dbinit', 'DB', 'Init', '{}', now()),
(10, 'importer', 'Importer', 'Bot', '{}', now()),
(11, 'matcher', 'Name', 'Matcher', '{}', now()),
(12, 'gbifsync',... | true |
565e574a93b2e2bd08fe0da7a6034ea517cc343e | SQL | LukaszBromberek/Portfolio | /accessor.sql | UTF-8 | 3,898 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 14, 2019 at 01:27 PM
-- Server version: 5.7.24
-- PHP Version: 7.3.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
be020b11136e9eed49e1bdcf16801eee9f5d80e9 | SQL | feedmari/GreenShop | /PlantsDB.sql | UTF-8 | 3,037 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1build0.15.04.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dic 02, 2015 alle 19:47
-- Versione del server: 5.6.25-0ubuntu0.15.04.1
-- PHP Version: 5.6.4-4ubuntu6.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 ... | true |
1a45e281c562c12c4b779883cfaef0dd63e3a826 | SQL | librame/learning | /temp/代码模板/sql/osms.sql | UTF-8 | 4,134 | 3.171875 | 3 | [
"MIT"
] | permissive | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50626
Source Host : 127.0.0.1:3306
Source Database : osms
Target Server Type : MYSQL
Target Server Version : 50626
File Encoding : 65001
Date: 2020-06-12 17:10:21
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
a7a7b5c90e318c8f3bd379b120cbda26067084e0 | SQL | RudyWg/Trust_DWBI | /01_数据查询/04_数据仓库层/04_信托合同主题/EDW_TC_资金端流动性.sql | WINDOWS-1252 | 1,879 | 3.171875 | 3 | [] | no_license | with temp_htxx as
(select c.c_proj_code,
c.c_name_full as c_proj_name,
a.c_cont_code,
a.l_begin_date,
a.l_preexp_date,
a.l_expiry_date,
f.c_cust_name,
f.c_cust_type,
f.c_cust_tytpe_n,
d.c_acco_no,
e.f_balance_agg
... | true |
af55d603c96e8d04d1b3a65a37704a7f953db662 | SQL | ellenlim01/DataBase | /ch01_5.sql | UTF-8 | 344 | 2.90625 | 3 | [] | no_license | SELECT DISTINCT
컬럼명 | *
FROM 테이블명
WHERE 조건식 (무한대)
GROUP BY 컬럼명 (여러 컬럼명도 줄 수 있다)
HAVING 그룹 바이의 조건식
LIMIT 레코드 수 조정
SELECT 열 이름
FROM 테이블 이름
WHERE 조건
USE java; -- 어떤 데이터베이스를 사용할지를 나타내는 명령어-- | true |
f0cf946252da188637f99344c765f74466a946fa | SQL | lll-666/emcs | /emcs-web/dbScript/tables/VA_TRANSFER_SEQ_转账流水表.sql | UTF-8 | 916 | 3 | 3 | [] | no_license | DROP TABLE IF EXISTS `VA_TRANSFER_SEQ`;
CREATE TABLE `VA_TRANSFER_SEQ`(
`TRANSFER_SEQ_NO` VARCHAR(32) NOT NULL COMMENT '转账流水号',
`PUB_SEQ_NO` VARCHAR(32) NOT NULL COMMENT '公共流水号',
`ORDER_NO` VARCHAR(32) NOT NULL COMMENT '业务流水号',
`PLAT_ID` VARCHAR(32) NOT NULL COMMENT '平台编号',
`PAYER_ID` VARCHAR(32) NOT NULL COMMENT... | true |
e10c83fad5a2cbe81ea3d1bbcf37dad4dc43eb94 | SQL | weglison/AplicationSecSaudePM | /bancosecsaude.sql | UTF-8 | 4,285 | 2.984375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
--
-- Host: localhost Database: bancosecsaude
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... | true |
0d4cb823c50b88e497c407b5438d99a48c42c288 | SQL | Basselalshayeb/Database-for-high-school-using-sqlserver | /4.sql | UTF-8 | 166 | 3.171875 | 3 | [] | no_license | select ID_subject
from Subject
where ID_subject not in (select ID_subject
from Lecture
where ID_day='thur' and ID_subject in (select ID_subject from Subject ));
| true |
6702d2add7b47bcff34cb80efb509d63422c15bd | SQL | MLClark/Bookmarks | /Benefit Specific/HSA/AMJ/AMJ_EBC_HSA_Eligibility_Export.sql | UTF-8 | 8,433 | 3.578125 | 4 | [] | no_license | SELECT distinct
pi.personid
,'PeopleStrategy'::varchar(50) as PartnerID
,'C98599_HSA'::varchar(25) as GroupID
, lc.locationcode
,CASE lc.locationcode
WHEN 'COR' THEN 'COR'
WHEN 'ATL' THEN 'ATL'
WHEN 'BET' THEN 'DC'
WHEN 'HOU' THEN 'HOU'
WHEN 'CHI' THEN 'CHI'
WHEN 'DEN' THEN 'DEN'
WHEN 'PHI'... | true |
374bc0a3e98d64779734203afc7e88dc4f8cb8d1 | SQL | evashi94/user-realm-api | /sql/createRealm.sql | UTF-8 | 259 | 2.5625 | 3 | [] | no_license | create database user_db;
create user 'brightTalkUser'@'%' identified by 'ThePassword';
grant all on user_db.* to 'brightTalkUser'@'%';
create table realm (id integer not null, description varchar(255), `key` varchar(32), name varchar(255), primary key (id)); | true |
564059d67fb787dd3ea9947f8d643eb513b993aa | SQL | osmcz/poloha.net_postgres | /schemas/osmexport/views/osmexport.current_relation_tags.sql | UTF-8 | 959 | 2.53125 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 9.6.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'LATIN2';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_m... | true |
1d80842f259db9db55410504b08ef24eb3479480 | SQL | Gardening-App/agile_sp_2021_GardeningApp | /GardenGnomes_html/sql/updateForHarvest.sql | UTF-8 | 5,060 | 3.015625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64)
--
-- Host: localhost Database: gardengnomes
-- ------------------------------------------------------
-- Server version 8.0.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... | true |
cc6f98fa11569806a3a3ea3926170058cd22efa8 | SQL | alexmat2on/Pictualize | /sql/createSchemas.sql | UTF-8 | 2,687 | 3.84375 | 4 | [] | no_license | Create Database Pictualize;
use Pictualize;
/* DEFINE SCHEMAS ------------------------------------------------------------*/
CREATE TABLE ImageTypes (
img_type VARCHAR(5) PRIMARY KEY
);
INSERT INTO ImageTypes VALUES ('MACRO'), ('TEMPL'), ('GIF'), ('AVATR');
CREATE TABLE Images (
imageID VARCHAR(40) PRIMARY KEY, /*... | true |
eb2056771fdb635ddffbd401a06d98d5edd7abcf | SQL | athidevwork/spartastarlakshmi | /CHCS/database/services_details.sql | UTF-8 | 1,426 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 07, 2015 at 06:54 PM
-- Server version: 5.1.41
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_S... | true |
5803a239759c105f218911ea8afc6303e763a2a8 | SQL | radtek/abs3 | /sql/mmfo/bars/Function/nam_a.sql | UTF-8 | 1,154 | 2.609375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/function/nam_a.sql =========*** Run *** ====
PROMPT =====================================================================================
CREATE OR REPLACE FUNCTION BA... | true |
1e0b4b7c1cdf3db8a48924a90b4205f298783c4f | SQL | IFRSEs2017/ProjetoX | /projetox.sql | UTF-8 | 4,558 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: 13-Nov-2017 às 02:14
-- Versão do servidor: 5.7.19
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
0cbd95579c3f6b9cfddc7aa6784bc3d32687e46d | SQL | iain-davis/Mumue | /src/main/resources/org/mumue/mumue/database/defaultData.sql | UTF-8 | 6,395 | 2.578125 | 3 | [] | no_license | insert into configuration_ports (id, port, type, supportsMenus) values (0, 4201, 'TELNET', true);
insert into configuration_ports (id, port, type, supportsMenus) values (1, 4202, 'TELNET', false);
insert into configuration_options (id, name, value) values (0, 'database schema version', '0.0');
insert into configuratio... | true |
62915eb36a375e59a7a24aea6a88770d0f7286f6 | SQL | GitZulong/4quater | /wx_user_group20190926.sql | UTF-8 | 2,381 | 3.046875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : VM198
Source Server Version : 50722
Source Host : 192.168.2.198:3306
Source Database : weeklyplan
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2019-09-17 08:05:54
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
675b8f910b3acf7549b08c0ea0f247607e1e48f5 | SQL | HHHHH-Y/MySQL | /LeetCode595. 大的国家/solution.sql | UTF-8 | 329 | 3.34375 | 3 | [] | no_license | -- 有一张 world 表
-- 如果一个国家的面积超过 300 万平方公里, 或者人口超过 2500 万, 那么这个国家就是大国家
-- 编写一个 sql 查询, 输出表中所有大国家的名称, 人口和面积
select
name, population, area
from
World
where
area > 3000000 or population > 25000000; | true |
6890b424e4e772dfaa11c7880b3d216426c68782 | SQL | maggsvisan/QRAccessControl | /data/AccessControlDB.sql | UTF-8 | 907 | 3.3125 | 3 | [] | no_license | CREATE TABLE Employee (
fName VARCHAR(30) NOT NULL,
lName VARCHAR(30) NOT NULL,
matricula VARCHAR(50) NOT NULL PRIMARY KEY,
position VARCHAR(50) NOT NULL
);
CREATE TABLE Admin (
fName VARCHAR(30) NOT NULL,
lName VARCHAR(30) NOT NULL,
matricula VARCHAR(50) NOT NULL PRIMARY KEY,
passwrd VARC... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.