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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6713ec2c7cbb804e6351f37368ebc424fddccce3 | SQL | voltsyjr/pdf-extractor | /media/images/Customer.sql | UTF-8 | 3,099 | 3.46875 | 3 | [] | no_license | CREATE DATABASE CUSTOMER_INFO;
USE CUSTOMER_INFO;
CREATE TABLE ORDER_INFO (
Id int primary key,
OrderDate date not null DEFAULT CURRENT_TIMESTAMP,
OrderNumber varchar(10) ,
CustomerId int not null,
TotalAm... | true |
db823688a5b9e4cc2870cc42db0beceba9f793e8 | SQL | fabric8-services/fabric8-tenant | /migration/sql-files/001-tenant-and-namespaces.sql | UTF-8 | 593 | 3.140625 | 3 | [
"Apache-2.0"
] | permissive | CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE tenants (
created_at timestamp with time zone,
updated_at timestamp with time zone,
deleted_at timestamp with time zone,
id uuid primary key NOT NULL,
email text
);
CREATE TABLE namespaces (
created_at timestamp with time zone,
updat... | true |
37fe7d18c9cce9723808829b8176b5453b92c39d | SQL | kulisfunk/week_3_day_1 | /day_1/zombies/zombies.sql | UTF-8 | 1,345 | 3.84375 | 4 | [] | no_license | DROP TABLE bitings;
DROP TABLE victims;
DROP TABLE zombies;
CREATE TABLE zombies (
id SERIAL8 PRIMARY KEY,
name VARCHAR(255),
type VARCHAR(255)
);
CREATE TABLE victims (
id SERIAL8 PRIMARY KEY,
name VARCHAR(255),
run_speed INT
);
CREATE TABLE bitings (
id SERIAL8 PRIMARY KEY,
zombie_id INT8 REFERENCE... | true |
34d77b8ca8ea403a1731603b3571fc09bb067aed | SQL | fandashtic/arc_chennai | /Sivabalan-SQL/SQL_STORED_PROCEDURE/sp_get_Count_Recd_customers.sql | UTF-8 | 136 | 2.625 | 3 | [] | no_license | CREATE Procedure sp_get_Count_Recd_customers
As
Select Distinct Count(ForumCode) From receivedcustomers
Where Status & 192 = 0
| true |
3f794250148c601890943f878594ec14c585429b | SQL | Grandeurwang/PostgreSQL | /Window function.sql | UTF-8 | 3,823 | 4.0625 | 4 | [] | no_license | #####
Note: You can’t use window functions and standard aggregations in the same query.
More specifically, you can’t include window functions in a GROUP BY clause.
# Intro to Window Function: https://blog.sqlauthority.com/2015/11/04/sql-server-what-is-the-over-clause-notes-from-the-field-101/
# Difference of ROW_... | true |
865b0218f2cb9ae5aec2e8f04dc081d6e117995f | SQL | andreigabor21/DBMS-Course | /Labs/Laboratory3/unrepeatable reads/update.sql | UTF-8 | 346 | 2.890625 | 3 | [] | no_license | USE BookLibrary;
--Unrepeatable reads
--T1: delay + update + commit
--wait 5 seconds, update and commit
BEGIN TRAN
WAITFOR DELAY '00:00:05'
UPDATE PublishingHouse
SET PhoneNumber = '0712345678'
WHERE PName = 'RAO'
COMMIT TRAN
--UNDO
UPDATE PublishingHouse
SET PhoneNumber = '0798765432'
WHERE PName = 'RAO'
SEL... | true |
5d97c89fedabf49a8f28c9d78e3c480117d162c8 | SQL | saulocalixto/IApl-2019-1-SBS | /AS03/1. Documentos/SQL/createBanco.sql | UTF-8 | 931 | 3.640625 | 4 | [
"MIT"
] | permissive | CREATE DATABASE IF NOT EXISTS bancolegal
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE bancolegal;
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `CONTA`;
DROP TABLE IF EXISTS `OPERACAO`;
DROP TABLE IF EXISTS `PESSOA`;
SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE PESSOA (
ID INT,
NOME VA... | true |
ffabfe0fd7a37a23a90b77810af9b8bb0f621962 | SQL | CharlotteH86/Javasamples_2020 | /Databas/dag_4/SQLkeys.sql | UTF-8 | 1,042 | 3.59375 | 4 | [] | no_license |
CREATE TABLE animal(
animal_id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT
,animal_name VARCHAR(20) NOT NULL
,animal_species VARCHAR(20) NOT NULL
);
INSERT INTO animal(animal_id,animal_name,animal_species) VALUES (1,'Nicke','apa');
INSERT INTO animal(animal_id,animal_name,animal_species) VALUES (2,'... | true |
ac539e7372648e1d7cf4443bbbd1a9f669354320 | SQL | tianran0207/BetterRa | /sql-files/upgrades/upgrade_20200625.sql | UTF-8 | 241 | 2.53125 | 3 | [] | no_license | ALTER TABLE `login`
ADD COLUMN `web_auth_token` VARCHAR(17) NULL AFTER `old_group`,
ADD COLUMN `web_auth_token_enabled` tinyint(2) NOT NULL default '0' AFTER `web_auth_token`,
ADD UNIQUE KEY `web_auth_token_key` (`web_auth_token`)
;
| true |
c58480b462dc6fcd77f394847da72041ef065afc | SQL | kkannappan4/UCSD_DS | /Databases_SQL/HW2/Cats/q5.sql | UTF-8 | 2,071 | 4.15625 | 4 | [] | no_license | -- Question 5
PREPARE Q5 (int) as
with log_cats as (
select X.user_id, Y.user_id as o_user_id, log(1 + sum(Y.like_calc * X.like_calc)) as weight
from
( select l1.video_id, 1 as like_calc, l1.user_id
from likes l1
where l1.user_id = $1) X,
( select l2.video_id, 1 as like_calc, l2.user_id
from likes ... | true |
c424306522d3bfd7de002dedb719fbec3aff5522 | SQL | bakkegaard/oscar | /sql/2015.sql | UTF-8 | 6,592 | 2.640625 | 3 | [] | no_license | USE oscar;
INSERT INTO film(navn) VALUES
(" American Sniper "),
(" Birdman or (The Unexpected Virtue of Ignorance) "),
(" Boyhood "),
(" The Grand Budapest Hotel "),
(" The Imitation Game "),
(" Selma "),
(" The Theory of Everything "),
(" Whiplash "),
(" Foxcatcher "),
(" Two Days, One Night "),
(" Still Alice "),
(" ... | true |
012dde3c1e9ea5d8acc76a86364176b16de67234 | SQL | JamRamirez/Proyecto1_progra4 | /src/java/databasepro.sql | UTF-8 | 1,770 | 3.75 | 4 | [] | no_license | drop database if exists cursoslibres;
create database cursoslibres;
use cursoslibres;
DROP TABLE IF EXISTS `usuarios`;
CREATE TABLE `usuarios` (
`id` varchar(9) NOT NULL,
`nombre` varchar(50) NOT NULL ,
`contrasenna` varchar(16) NOT NULL ,
`telefono` varchar(8) DEFAULT NULL,
`email` varchar(50) DEFAULT NU... | true |
42c413e25227fed5033d8aaa65503a1be90b6664 | SQL | achmadnabawi/sparkdata | /public/DDL/ec_tb/t_base_ec_tb_xianyu_userinfo.DDL.sql | UTF-8 | 653 | 2.921875 | 3 | [] | no_license |
CREATE EXTERNAL TABLE if not exists t_base_ec_tb_xianyu_userinfo(
userId string comment '' ,
totalCount string comment '',
gender string comment '性别',
idleUserId string comment '账号是否闲置 猜测',
nick string comment '闲鱼昵称',
tradeCount string comment '',
tradeIncome string comment '',
userNick string comment '淘宝昵称'... | true |
b85b88d983b11708d0fc3822f5c4b41b67590bb0 | SQL | coffeba/Spring | /spring-ssm-seckill/src/main/sql/schema.sql | UTF-8 | 1,784 | 3.765625 | 4 | [
"MIT"
] | permissive | -- 数据库初始化脚本
-- 创建数据库
CREATE DATABASE seckill;
-- 使用数据库
USE seckill;
-- 创建秒杀库存表
CREATE TABLE seckill (
`seckill_id` BIGINT NOT NULL AUTO_INCREMENT
COMMENT '商品库存ID',
`name` VARCHAR(120) NOT NULL
COMMENT '商品名称',
`number` INT NOT NULL
COMMENT '商品库存数',
`start_time` TIMESTAMP N... | true |
23986d27a836a0147ee04ec105202fea7897a0ef | SQL | cosmic-cowboy/trash-collection-schedule-app | /sql/TrashCollection.sql | UTF-8 | 417 | 3.125 | 3 | [] | no_license | CREATE TABLE town (
town_id SERIAL PRIMARY KEY,
postal_code VARCHAR(7) NOT NULL, -- 1001000
town VARCHAR NOT NULL, -- 井草
chou VARCHAR -- 1〜3丁目
);
CREATE TABLE type (
type_id SERIAL PRIMARY KEY,
town_id INT NOT NULL,
days_of_week VARCHAR(3) NOT NULL, -- MON,TUE,WED,THU... | true |
23aa5f030a37fb1889a0f6096049f3e3e39e4065 | SQL | vincentbasset/cide1 | /sql/cide_table_vote.sql | UTF-8 | 473 | 2.9375 | 3 | [] | no_license |
-- --------------------------------------------------------
--
-- Structure de la table `vote`
--
CREATE TABLE `vote` (
`idUtil` int(11) NOT NULL,
`idPost` int(11) NOT NULL,
`type` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Contenu de l... | true |
7d68c475c93653a928456ca5e8d4aee7fe787faa | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day25/select0827.sql | UTF-8 | 264 | 2.890625 | 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='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2086','5100_6','4059','6026','3243','2089','4221','5013','2029','6064'])
| true |
542d35cdc974fcf7f5444b4007b0a29d48b65ac8 | SQL | linzmacd/Final_Project | /schema.sql | UTF-8 | 1,667 | 3.703125 | 4 | [] | no_license | CREATE TABLE county (
CensusId int,
State varchar(50),
County varchar(50),
TotalPop int,
Men int,
Women int,
Hispanic float,
White float,
Black float,
Native float,
Asian float,
Pacific float,
Citizen int,
Income float,
IncomeErr float,
IncomePerCap int,
IncomePerCapErr int,
Poverty float,
ChildPove... | true |
38f5e1ed108d7c802d2b8dff044c97bb86ff4f85 | SQL | jampaniuday/sql_source | /sql/sessions_privs.sql | UTF-8 | 688 | 3.453125 | 3 | [] | no_license | set linesize 156;
set pagesize 66;
column owner format a25;
column object_name format a25;
ttitle center '***** Database Objects *****' -
right 'Page: ' format 99 sql.pno skip -
center 'DBA_OBJECTS View' skip 2
SELECT owner,
object_name,
object_type,
object_id,
created "Cre... | true |
91a87df25956081bccd7ee6b62989b1a7b9caa3f | SQL | nisshii0313/practiceSQL | /More_JOIN/6_15.sql | UTF-8 | 357 | 3.796875 | 4 | [] | no_license | /*List all the people who have worked with 'Art Garfunkel'.*/
SELECT actor.name FROM actor
JOIN casting ON actor.id = casting.actorid
JOIN movie ON casting.movieid = movie.id
WHERE actor.name != 'Art Garfunkel' AND movie.id IN (
SELECT casting.movieid FROM casting
WHERE casting.actorid IN (
SELECT actor.... | true |
fd4b4c2d7d6d62c130c27b1c650982cee1623b10 | SQL | ahmedabdalmageed95/Examination-System-Database | /ReportProcedures.Sql | UTF-8 | 1,772 | 3.5625 | 4 | [] | no_license | --___________________________________________________________
create proc ProcSelectStudentAccordingtoDepartment @dno int
as
select*from student where dno=@dno
exec ProcSelectStudentAccordingtoDepartment 1
-------------------------------------------------------------
create proc ProcSelectStudentGrades @sid in... | true |
3ffc0bce63d9cbd4134e4eecc072dfc52eebb412 | SQL | FelipeCarvalho25/UniCarEJW | /webservice/db_unicar.sql | UTF-8 | 7,204 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 28-Jun-2020 às 00:29
-- Versão do servidor: 10.1.37-MariaDB
-- versão do PHP: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
41fb2e0347d7aa690c01b3724219d0568214b6d9 | SQL | marcoroni/Nitup | /nitup.sql | UTF-8 | 5,191 | 3.359375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.14
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Mar 21, 2016 at 04:19 AM
-- Server version: 10.0.20-MariaDB
-- PHP Version: 5.6.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_... | true |
88425060a4986f502c10f884a5bf0cfc886ca4e7 | SQL | meta-prakalpa-rathore/GET2018 | /DBMS-Assignment-3/queryS3A4.sql | UTF-8 | 1,519 | 4.125 | 4 | [] | no_license | /*Consider a form where providing a Zip Code populates associated City and
State.*/
/*Create appropriate tables and relationships for the same and write a SQL
query for that returns a Resultset containing Zip Code, City Names and
States ordered by State Name and City Name.*/
USE store_front;
CREATE TABLE state(
state... | true |
a8ac2339d8b15fe7acf7778edcd122d36f400ffd | SQL | amabdallah/test2 | /WaMDaMFeb7_2017for_SQLite.sql | UTF-8 | 16,373 | 3.546875 | 4 | [
"BSD-3-Clause"
] | permissive | -- This is a Data Definition Language (DDL) script that
-- generates a blank schema of the Water Management Data Model (WaM-DaM)
-- for SQLite database
-- Generated by Adel Abdallah February 7, 2017 based on WaM-DaM XML design named WaMDaMFeb7_2017.xml generated by DbWrench V4.0 @ http://www.dbwrench.com
-- WaM-DaM Al... | true |
1d16e2be2e14ccba8c10d0590ebf44737b41b950 | SQL | radtek/abs3 | /sql/mmfo/bars/View/v_sto_sbon_provider.sql | WINDOWS-1251 | 2,318 | 3.21875 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/View/V_STO_SBON_PROVIDER.sql =========*** Ru
PROMPT =====================================================================================
PROMPT *** Create view V_ST... | true |
51faf034716d14d7f999d156e00c9affccc0aef5 | SQL | TaHieu-scuti/SQL_workshop | /database/design/structure/create_repo_yss_searchquery_report_conv.sql | UTF-8 | 4,518 | 3.453125 | 3 | [] | no_license | /**
* ADgaienr Solutions Reporting System
* Schema : ADGAINER_db_SECURE
* Table Name : repo_yss_searchquery_report_conv
* Auther : Tetsuya Takiguchi
*/
CREATE TABLE IF NOT EXISTS `ADGAINER_db_SECURE`.`repo_yss_searchquery_report_conv` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`exeDate` DATE NOT NULL COMMENT 'YSS... | true |
e32b68df7bd76070ec3c976a23d862d87c2239b4 | SQL | 47lining/quickstart-datalake-47lining | /assets/analysis/redshift_sql/create_sku_distribution.sql | UTF-8 | 341 | 3.734375 | 4 | [
"Apache-2.0"
] | permissive | DROP TABLE IF EXISTS sku_distribution;
CREATE TABLE sku_distribution AS (
SELECT product_category, orders.sku, COUNT(*) AS sku_count FROM
orders JOIN {{ external_schema_name }}.ext_products ON orders.sku = ext_products.sku
WHERE ext_products.dt = '2016-12-31'
GROUP BY product_category, orders.sku ORDER BY sku_c... | true |
a74bd41ded0db67124b9277b41bc19e04017063e | SQL | kuien/ssb-dbgen | /queries/Q2.1.sql | UTF-8 | 293 | 3.078125 | 3 | [] | no_license | --PROMPT Q2.1
SELECT SUM(LO_REVENUE), D_YEAR, P_BRAND
FROM LINEORDER, DATES, PART, SUPPLIER
WHERE LO_ORDERDATE = D_DATEKEY
AND LO_PARTKEY = P_PARTKEY
AND LO_SUPPKEY = S_SUPPKEY
AND P_CATEGORY = 'MFGR#12'
AND S_REGION = 'AMERICA'
GROUP BY D_YEAR, P_BRAND
ORDER BY D_YEAR, P_BRAND;
| true |
05cd9c54b2b38235ccf7e2de43f3d3a18201150b | SQL | ManuBedoya/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/6-states.sql | UTF-8 | 216 | 2.609375 | 3 | [] | no_license | -- Create database and table with primary key
CREATE DATABASE IF NOT EXISTS hbtn_0d_usa;
USE hbtn_0d_usa;
CREATE TABLE IF NOT EXISTS states(
id INT(1) AUTO_INCREMENT PRIMARY KEY UNIQUE NOT NULL,
name VARCHAR(256)
);
| true |
3b079c698e0e7dd207c6f79d1de52fa1bc2bfa69 | SQL | aldroidsystem/hormid | /target/classes/Database/DDL/tb_timbang_mobil.sql | UTF-8 | 229 | 2.890625 | 3 | [] | no_license | drop table tb_timbang_mobil;
create table tb_timbang_mobil (
no_slip number(38) not null,
supir number(30),
no_polisi varchar2(10),
CONSTRAINT ct_timbang_mobil_fk FOREIGN KEY (no_slip) REFERENCES tb_timbang (no_slip)
); | true |
a24358607a770eec97ef96ef9791e2874fbd1d45 | SQL | liuqian1990/we-cmdb | /cmdb-core/src/database/delta/917_log_enhance.sql | UTF-8 | 304 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | ALTER TABLE adm_log
MODIFY COLUMN guid VARCHAR(20) DEFAULT NULL;
ALTER TABLE adm_log DROP PRIMARY KEY;
ALTER TABLE adm_log ADD PRIMARY KEY(`id_log`);
ALTER TABLE adm_log
MODIFY COLUMN `id_log` INT(11) NOT NULL AUTO_INCREMENT,
ADD COLUMN request_url VARCHAR(500),
ADD COLUMN client_host VARCHAR(20);
| true |
dffff72717f36a30dbea41ea2687e7596d5b75b2 | SQL | slackmagic/helix-shared-lib | /helix-tracker-lib/db/tables.sql | UTF-8 | 1,819 | 3.4375 | 3 | [] | no_license |
CREATE TABLE tracker_v2.type
(
id character varying(64) COLLATE pg_catalog."default" NOT NULL,
name character varying(128) COLLATE pg_catalog."default" NOT NULL,
expire_dafter character varying(256) COLLATE pg_catalog."default",
refresh_every character varying(256) COLLATE pg_catalog."default",
CON... | true |
729cb3388a08c0a7425f8d61813b037d4e0177d8 | SQL | Crousti-Poulet/projet_php_cinema | /sql/reset_password.sql | UTF-8 | 5,407 | 2.765625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1
-- Généré le : jeu. 19 avr. 2018 à 17:07
-- Version du serveur : 10.1.31-MariaDB
-- Version de PHP : 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... | true |
5c8a19ac007c708ac7988e7a8e5824a6a58dbe0f | SQL | 2156744b/project | /tpch/sf_1/queries/q4/q4_parquet_v2.sql | UTF-8 | 337 | 3.296875 | 3 | [] | no_license | INSERT INTO TABLE q4_order_priority_par
select o_orderpriority, count(distinct l_orderkey) as order_count
from orders_par o join lineitem_par l on o.o_orderkey = l.l_orderkey and o.o_orderdate >= '1994-10-01' and o.o_orderdate < '1995-01-01' and l.l_commitdate < l.l_receiptdate
group by o_orderpriority
order by o_o... | true |
99b5ad915c6cf3480a1f111f15c4591796e215a0 | SQL | nirzhor-cyclonite/Intrusion-Detection-System | /Intrusion Detection System/Functions, Procedures and View/[Procedure] Search Malicious.sql | UTF-8 | 1,326 | 3.296875 | 3 | [] | no_license | SET SERVEROUTPUT ON;
CREATE OR REPLACE PROCEDURE Search_Malicious(Ttl_Fwd_Pckt IN FrequentPackets.Total_Fwd_Packets%TYPE, Total_Bwd_Pckt IN FrequentPackets.Total_Backward_Packets%TYPE,
Ttl_Len_of_Fwd_Pckt IN FrequentPackets.Total_Length_of_Fwd_Packets%TYPE, Ttl_Len_of_Bwd_Pckt IN FrequentPackets.Total_Length... | true |
b50bc1a117786fded3320077aae293f796caf0cf | SQL | irispastal/jeecmsv9 | /src/main/webapp/sql/update-v9_2-v9_3-oracle.sql | UTF-8 | 5,762 | 3.484375 | 3 | [] | no_license |
create table jc_sms(
id number(11) not null,
name varchar2(255) not null,
access_key_id varchar2(255) not null,
access_key_secret varchar2(255) not null,
template_code varchar2(255) not null,
template_param varchar2(255),
interval_time number(11),
interval_unit number(1),
effective_time number(11),
effective... | true |
6d2d447b85ea7bb7fd1f4b5a160022228cb4025d | SQL | sebastianflaquer/ObligatorioP3-Adriana | /BD/CreateDB.sql | UTF-8 | 1,009 | 2.640625 | 3 | [] | no_license | create database ObligatorioP3_2;
create table Viviendas(
Id int PRIMARY KEY,
Habilitada bit not null,
Tipo varchar(1) check(Tipo in('N', 'U')) not null,
Estado varchar(12) check(Rol in('Recibida', 'Habilitada', 'Inhabilitada', 'Sorteada')),
Calle varchar(150) not null,
Numero varchar(20) not null,
Barr... | true |
56e82fc1690c9ff941aa0f236b0a0e6495e695c1 | SQL | lee-saint/lab-oracle | /이성인_ex02.sql | UHC | 997 | 3.703125 | 4 | [] | no_license | /*
2.
Ǻġ (Fibonacci numbers) մϴ.
1, 1, 2, 3, 5, 8, 13, 21, 34, ...
Ǻġ Ϲȭ ֽϴ.
f[1] = 1, f[2] = 1,
f[n] = f[n-1] + f[n-2], n >= 3
Ǻġ 20 ϴ PL/SQL ۼϼ.
̿ϴ Ǻġ Ȳݺ(golden ratio) Ҹ 1.61803... ̼.
f[n+1] / f[n] ~ 1.61803...
*/
create or replace function fbnc (p_n number) return number
is
begin
if p_n = 1 or p... | true |
6d1a373e476107fcb7384cbbc6f88991b8b12fdd | SQL | namanhgithub98/C0421G1_Nguyen_Van_Doanh_Module3 | /caseStud_Database/Task11_12_13_14_15_16.sql | UTF-8 | 2,657 | 3.75 | 4 | [] | no_license | use caseStudy_Database;
-- Task11
select dvdk.id_dich_vu_di_kem,dvdk.ten_dich_vu_di_kem,dvdk.gia,dvdk.don_vi,dvdk.trang_thai_kha_dung,lk.ten_loai_khach,kh.dia_chi
from dich_vu_di_kem dvdk
join hop_dong_chi_tiet hdct on dvdk.id_dich_vu_di_kem=hdct.id_dich_vu_di_kem
join hop_dong hd on hdct.id_hop_dong = hd.id_hop_dong
... | true |
d621aafac794a0f28ad0fa949201c023d61360d3 | SQL | narumi817/j_report | /conf/evolutions/default/2.sql | UTF-8 | 336 | 2.75 | 3 | [] | no_license | # talent schema
# --- !Ups
CREATE TABLE `talent` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`name_read` varchar(255) NOT NULL DEFAULT '',
`delete_flg` boolean DEFAULT false,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# --- !Downs
DROP TABLE IF E... | true |
367c46211001864a776782e41674ee6aebdf03f0 | SQL | Lihaij/Erc-node | /ddl/20180227.sql | UTF-8 | 1,738 | 3.171875 | 3 | [] | no_license | SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
/*
your backup sql
*/
/* ls */
DROP TABLE IF EXISTS `tbl_erc_notice`;
CREATE TABLE `tbl_erc_notice` (
`notice_id` bigint(20) NOT NULL AUTO_INCREMENT,
`domain_id` bigint(20) NOT NULL,
`user_id` varchar(30) NOT NULL DEFAULT '',
`notice_title` varchar(200) DEFAULT N... | true |
0cd5697f254c332ede6ea066106dbd768013a152 | SQL | brianhigh/data-workshop | /scripts/testing_lab/import_ohio_epa_leachate_data.sql | UTF-8 | 6,520 | 3.890625 | 4 | [
"CC0-1.0"
] | permissive | /* Import script for Ohio EPA Data into our Lab Sample Testing database */
/* Last updated by BKH on 2014-05-23. */
/* For this example, we are assumging that the database name is "high". */
USE high;
/* We will assume that the empty database and empty tables have been
created from the schema file or from the Da... | true |
f9878e795c2e8f3f39d56fd240364217b774aaeb | SQL | tina-wuuuuu/Dream_store | /store.sql | UTF-8 | 32,869 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- 主機: localhost:3306
-- 產生時間: 2020 年 10 月 12 日 07:59
-- 伺服器版本: 5.7.31-0ubuntu0.18.04.1
-- PHP 版本: 7.2.24-0ubuntu0.18.04.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+08:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER... | true |
df0923963867d11efef86ccdd8e712f97556bae4 | SQL | mateuslana7/ufop-works | /Banco de Dados I/TP2 - Projeto Completo de um BD/RPG.sql | UTF-8 | 8,265 | 3.265625 | 3 | [] | no_license | CREATE USER BCC321 PASSWORD 'bcc321-17.2';
DROP SCHEMA RPG CASCADE;
CREATE SCHEMA IF NOT EXISTS RPG;
GRANT ALL ON DATABASE RPGDB TO BCC321;
GRANT ALL ON ALL TABLES IN SCHEMA RPG TO BCC321;
----------------------------bcc321--------- PERSONAGEM --------------------------------
CREATE TABLE IF NOT EXISTS RPG.Status... | true |
d6b62941f17e5645e755aabb624c8d46166468f6 | SQL | AwesomeTeamPlayer/auth-service-go | /migrations/0.sql | UTF-8 | 373 | 3.078125 | 3 | [] | no_license | CREATE TABLE emails (
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL DEFAULT '',
CONSTRAINT emails_id PRIMARY KEY (ID),
UNIQUE(email)
);
CREATE TABLE sessions (
id INT NOT NULL AUTO_INCREMENT,
email_id INT NOT NULL,
session_key TEXT NOT NULL,
label TEXT N... | true |
a15078f9aefe02e2bee9213b4b1cbfef0ad013a0 | SQL | violaxing/CSC343 | /A2/q4.sql | UTF-8 | 1,232 | 4.15625 | 4 | [] | no_license | -- Grader report
SET SEARCH_PATH TO markus;
DROP TABLE IF EXISTS q4;
-- You must not change this table definition.
CREATE TABLE q4 (
assignment_id integer,
username varchar(25),
num_marked integer,
num_not_marked integer,
min_mark real,
max_mark real
);
-- You may find it convenient to do this for each of th... | true |
f0a43d632c8fc1a9f60e140891cccf8b3a38439b | SQL | jonamuen/sql-reduce | /test/sqlsmith/sqlite/1852.sql | UTF-8 | 249 | 2.671875 | 3 | [
"MIT"
] | permissive | select
ref_0.name as c0,
ref_0.id as c1,
ref_0.id as c2,
ref_0.name as c3,
ref_0.id as c4,
(select id from main.t0 limit 1 offset 6)
as c5,
ref_0.name as c6
from
main.t0 as ref_0
where (0)
or (ref_0.id is not NULL);
| true |
241554ef27c19f8e5ddf17ebf0c8aac6abecc91e | SQL | Sauluslo/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/2-create_read_user.sql | UTF-8 | 511 | 3.109375 | 3 | [] | no_license | -- 2. Read user
-- A Script that creates the database hbtn_0d_2 and the user user_0d_2.
-- (1) user_0d_2 should have only SELECT privilege in the database hbtn_0d_2
-- (2) The user_0d_2 password should be set to user_0d_2_pwd
-- (3) If the database hbtn_0d_2 already exists, your script should not fail
-- (4) If the use... | true |
b0b457d317dbd5469ae4a22e932ef2ad59d154e8 | SQL | justinlettau/sql-source-control-example | /_sql-database/tables/Purchasing.PurchaseOrderHeader.sql | UTF-8 | 3,029 | 3.765625 | 4 | [] | no_license | IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[Purchasing].[PurchaseOrderHeader]') AND type = 'U')
CREATE TABLE [Purchasing].[PurchaseOrderHeader]
(
[PurchaseOrderID] int NOT NULL IDENTITY(1, 1),
[RevisionNumber] tinyint NOT NULL DEFAULT((0)),
[Status] tinyint NOT NULL DEFAULT((1)),
... | true |
c7b4c04809667eb98fdbc88010c7f949f26c7015 | SQL | sosoberg/employee_tracker | /db/employeeDB.sql | UTF-8 | 1,574 | 4.09375 | 4 | [] | no_license | create database employeesDB;
use employeesDB;
create table department (
id int auto_increment,
name varchar(30) not null,
primary key (id)
);
drop table if exists role;
create table role (
id int auto_increment,
title varchar(30) not null,
salary int(30) not null,
department_id varchar(30) not ... | true |
71db6c1762bced8d2f5474a5e21a202a5c9641f4 | SQL | MarioEstebanSuaza/holbertonschool-higher_level_programming | /0x0E-SQL_more_queries/14-my_genres.sql | UTF-8 | 436 | 3.921875 | 4 | [] | no_license | -- Import the database dump from hbtn_0d_tvshows to your MySQL server
-- (same as 13-count_shows_by_genre.sql)
-- Write a script that uses the hbtn_0d_tvshows database to lists
-- all genres of the show Dexter.
SELECT tv_genres.name FROM tv_shows INNER JOIN tv_show_genres ON tv_shows.id = tv_show_genres.show_id
INNER J... | true |
b2a9f640dab8d663e9a95f9e33129c3cd7d48775 | SQL | souravrrp/AKG-SCIL-SQL | /View/SCIL SMS/Dummy/XXAKG_SCIL_ORDER_SMS_V.sql | UTF-8 | 3,391 | 3.1875 | 3 | [] | no_license | DROP VIEW APPS.XXAKG_SCIL_ORDER_SMS_V;
/* Formatted on 4/10/2019 3:31:35 PM (QP5 v5.136.908.31019) */
CREATE OR REPLACE FORCE VIEW APPS.XXAKG_SCIL_ORDER_SMS_V
(
ORG_ID,
OPERATING_UNIT,
REGION,
CUSTOMER_NUMBER,
CUSTOMER_NAME,
ORDER_NUMBER,
ORDERED_... | true |
b430b1db05753742b31d269abb7356c70f018b82 | SQL | Ruaa-Ali/C-GlassesShop | /db/cshop.sql | UTF-8 | 4,777 | 2.96875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 12, 2023 at 10:43 PM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
3720131008cf332194f65e266879e6bd28ac7284 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/high/day23/select1556.sql | UTF-8 | 191 | 2.875 | 3 | [] | no_license |
SELECT timeStamp, temperature
FROM ThermometerObservation
WHERE timestamp>'2017-11-22T15:56:00Z' AND timestamp<'2017-11-23T15:56:00Z' AND SENSOR_ID='e6825584_a56e_4ac3_9eb6_a79076e16ec4'
| true |
414e7f62631415ffed8f517e3c5d6bcd5dfc023a | SQL | saixen/dbad01 | /sql/northwind.sql | UTF-8 | 1,930 | 3.765625 | 4 | [] | no_license | CREATE TABLE Categories (
CategoryID int NOT NULL,
CategoryName VARCHAR(255),
Description VARCHAR(255),
PRIMARY KEY (CategoryID)
);
CREATE TABLE Suppliers (
SupplierID int NOT NULL ,
SupplierName VARCHAR(255),
ContactName VARCHAR(255),... | true |
f35f8ef368a64da00ce4f8a8315a8910504bfdde | SQL | shenqidecaonima/python_tutorial | /Week4/第14节Django的模型层/myapp_users.sql | UTF-8 | 1,323 | 3 | 3 | [] | no_license | /*
SQLyog 企业版 - MySQL GUI v7.14
MySQL - 5.5.5-10.1.30-MariaDB : Database - mytest
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 ... | true |
bf380351b936e34e1b082520dbef7aa5a30f1fad | SQL | kwakhowon/Howon | /Spring_Labs_STS/spring_security_Basic06_handler/src/main/webapp/resources/myintranet_user.sql | UTF-8 | 428 | 2.9375 | 3 | [] | no_license | CREATE TABLE `user` (
`EMAIL` varchar(255) NOT NULL,
`PASSWD` varchar(255) NOT NULL,
`ENABLED` int(1) NOT NULL DEFAULT '1',
`AUTHORITY` varchar(20) NOT NULL DEFAULT 'ROLE_USER',
PRIMARY KEY (`EMAIL`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table userT(
email varchar2(200) primary key,
passwd varchar... | true |
630cb1a9fc3a06d19c93d19ae7e8ecf6255a87f7 | SQL | entur/tiamat-scripts | /find_stops_with_multiple_tariff_zones/stops_with_multiple_tariff_zones.sql | UTF-8 | 8,253 | 2.65625 | 3 | [] | no_license | select s.netex_id, count(tzref.ref) from stop_place s inner join stop_place_tariff_zones sptz on s.id = sptz.stop_place_id inner join tariff_zone_ref tzref on tzref.id = sptz.tariff_zones_id where s.version = (select max(sv.version) from stop_place sv where sv.netex_id = s.netex_id) group by s.netex_id having count(tzr... | true |
8162db6685b34ee233fab188024171c8d90fb43b | SQL | abhijitpatkar/Analytics_Interface | /analyticsdb.sql | UTF-8 | 33,526 | 3.140625 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_cata... | true |
e7d70a1e66544d481572e54bf8bbf3f58a234d33 | SQL | sergiovasquez122/CECS-323 | /homework6.sql | UTF-8 | 1,715 | 4.28125 | 4 | [] | no_license | -- 37
select customername from customers
except
select customername from customers
natural join orders where
year(orderdate) = 2015;
-- 38
select CONTACTLASTNAME as lastname, CONTACTFIRSTNAME as firstname, CUSTOMERNAME
from customers
union
select lastname, firstname, upper('employee') as customername from EMPLOYEES
or... | true |
2fac4197c01e6be7c40b07cbf61cea272d8828fd | SQL | OlhaZSholohon/LV468 | /DataMartTables/DimClients.sql | UTF-8 | 490 | 2.578125 | 3 | [] | no_license | USE [TestDBDataMart];
IF OBJECT_ID('[datamart].[DimClients]', 'U') IS NOT NULL
DROP TABLE [datamart].[DimClients];
CREATE TABLE [datamart].[DimClients](
[ClientID] [int] IDENTITY(1,1) NOT NULL,
[FirstName] [nvarchar](50) NULL,
[LastName] [nvarchar](50) NULL,
[Gender] [nvarchar](11) NULL,
[Birthday] [date] NUL... | true |
a3c21278500563e32ec1a1c35b31858f5cebf101 | SQL | emilycboyle/closet-inventory | /garments_create.sql | UTF-8 | 1,053 | 3.3125 | 3 | [] | no_license | CREATE TABLE closet.garments (
garment_id serial PRIMARY KEY,
garment_group varchar(255) NOT NULL,
sub_group varchar(255) NOT NULL,
colour varchar(255) not NULL,
sub_colour varchar(255),
brand varchar(255),
print varchar(255),
in_clos... | true |
c3397a181cef1ed9546c9a9bfcae3d73087296d4 | SQL | mccludav/project_mvp | /db/fp_manipulation_queries.sql | UTF-8 | 5,793 | 4.25 | 4 | [
"MIT"
] | permissive | -- MySQL Database Manipulation Queries
--
-- Host: classmysql.engr.oregonstate.edu
-- Database: cs340_deae
-- Authors: Edmund Dea, Sam Judkis
-- Date: 2/9/2019
-- ------------------------------------------------------
-- Check whether user login is successful.
-- If login is successful, then return the user id.
-- ... | true |
22358e8e8259a2b79fd329440062362669bf0da9 | SQL | GustavoDDias/rpa-challenge | /docs/database/script_db_rba.sql | UTF-8 | 686 | 2.734375 | 3 | [] | no_license | CREATE DATABASE `db_rpa`;
USE `db_rpa`;
CREATE TABLE `db_rpa`.`pessoa` (
`Id` INT NOT NULL AUTO_INCREMENT,
`Nome` VARCHAR(300) NULL,
`Cidade` VARCHAR(300) NULL,
`Estado` VARCHAR(150) NULL,
PRIMARY KEY (`Id`));
CREATE TABLE `db_rpa`.`contato` (
`Id` INT NOT NULL AUTO_INCREMENT,
`Pessoa_Id` INT NULL,
`... | true |
1e23ee208a1318e9f50739cbcbf9b9b5300da6ff | SQL | yuvarajbu/plm | /database/insert.sql | UTF-8 | 1,102 | 2.828125 | 3 | [] | no_license | use plm;
insert into `Role`(id,name) values (1,"Stakeholder");
insert into `Role`(id,name) values (2,"Project Leader");
insert into `Role`(id,name) values (3,"Business Analyst");
insert into `Role`(id,name) values (4,"Quality Assurance");
insert into `Role`(id,name) values (5,"Developer");
insert into `Role`(id,name) ... | true |
9165ee5d70c6ddc8730b6d7cf103da530351a4f2 | SQL | jsarge11/employee-manager | /db/create_table_seed.sql | UTF-8 | 2,165 | 3.546875 | 4 | [] | no_license | create table if not exists employees (
employee_id serial primary key,
first_name varchar(40) not null,
last_name varchar(40) not null,
work_phone varchar(10) unique not null,
personal_phone varchar(10) unique,
work_email varchar(256) unique not null,
personal_email varchar(256) unique,
... | true |
f0db6b2cd9ab9396a9dd975491a659b36de4fb63 | SQL | beyanerrahim/bmg-3-project | /online_exam.sql | UTF-8 | 4,594 | 3.515625 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 03, 2021 at 11:23 AM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
90a8778ee2fe6a5e251a909678b065d50a019f3d | SQL | abdulmuis-web/sekolah-ppdb | /db_sekolah.sql | UTF-8 | 5,092 | 2.8125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 13, 2019 at 10:18 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
e8b8af6a1fef737cbe315c5a3da6bc55c843cf2d | SQL | AlexRogalskiy/postgraphile-as-library | /db/init/01-data.sql | UTF-8 | 410 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | \connect forum_example;
/*Create some dummy users*/
INSERT INTO public.user (username) VALUES
('Benjie'),
('Singingwolfboy'),
('Lexius');
/*Create some dummy posts*/
INSERT INTO public.post (title, body, author_id) VALUES
('First post example', 'Lorem ipsum dolor sit amet', 1),
('Second post example', 'Con... | true |
fbb552545cb5048586ef2e9ba4b83259bf607f26 | SQL | Vinay523/Jubi | /Downloads/root/jubi.api/models/scripts/functions/get_current_program_id.sql | UTF-8 | 321 | 3.09375 | 3 | [] | no_license | DROP FUNCTION IF EXISTS `get_program_major_version`;
CREATE FUNCTION `get_program_major_version`(linkId INT)
RETURNS INT
BEGIN
SELECT P.id INTO @result
FROM Programs P
WHERE
P.linkId=linkId AND
(preview<>0 OR (preview=0 AND P.status='ready'))
ORDER BY P.createdAt DESC
LIMIT 1;
RETURN @result;
EN... | true |
53e51fb03a6a3586e4ae116de872410aefd82164 | SQL | CUBRID/cubrid-testcases | /sql/_01_object/_08_primary_foreign_key/_001_create/cases/1034.sql | UTF-8 | 540 | 3.296875 | 3 | [
"BSD-3-Clause"
] | permissive | -- create subclass from superclass having primary key
create class a1 (c1 int primary key);
create class a2 under a1 (c2 int primary key);
select attr_name, is_nullable from db_attribute where class_name = 'a1' order by 1,2;
select * from db_index where class_name = 'a1' order by 1,2;
select * from a1 order by ... | true |
4c6c0674cdb130e0168d68ed7e8f61cf07416288 | SQL | lanmolsz/wms | /Dddml.Wms.Services.Tests/Sql/hbm2ddl_update.sql | UTF-8 | 37,586 | 3.296875 | 3 | [] | no_license |
create table AttributeValue_RV (
AttributeValueIdAttributeId VARCHAR(50) not null,
AttributeValueIdValue VARCHAR(50) not null,
AttributeVersion BIGINT not null,
AttributeValueName VARCHAR(255),
Description VARCHAR(255),
ReferenceId VARCHAR(255),
Version BIGINT,
... | true |
e3563e7d48c4875f34aa0756c70e525a3c878e59 | SQL | Yash6578/Nagarro-Fresher-Training-Java | /Nagarro Fresher Training Java/Assignment 2/Exercise 1/SQLQuery4.sql | UTF-8 | 203 | 3.375 | 3 | [] | no_license | -- Query to Display Name and Color of the Product with the maximum weight.
SELECT Name
, Color
, Weight AS MaxWeight
FROM Production.Product
WHERE Weight = (SELECT MAX(Weight) FROM Production.Product) | true |
871e343c733ea48f2c97ecc9bf46276d33e3b98d | SQL | ravi1045teja/web-scrapong-database-management | /Schema Scripts/Scheema_GoogleApp_Afer_NF.sql | UTF-8 | 1,179 | 3.25 | 3 | [] | no_license | Create Database GooglePlayNF;
USE GooglePlayNF;
CREATE TABLE `Genre` (
`Genre_Id` varchar(5) NOT NULL,
`Genre_Name` varchar(45) NOT NULL,
PRIMARY KEY (`Genre_Id`)
) ;
CREATE TABLE `Category` (
`Category_Id` varchar(5) NOT NULL,
`Category_Name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`Category_Id`)
);
CREATE... | true |
4a062160a2f7c3774aa03265c330f88a987ddeaa | SQL | joellinho/Hotel | /Hotel/WebContent/bd/hotel 20140118 1159.sql | UTF-8 | 26,406 | 3.09375 | 3 | [] | no_license | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.5.29
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
... | true |
8b1f43be6b5a0187a82718fa4b7b097974bcf0cd | SQL | RichardStaines/JavaSpringReactCars | /src/main/resources/db/migration/V2__LoadInitialData.sql | UTF-8 | 714 | 2.53125 | 3 | [] | no_license | insert into user
(username, password, role)
values
("admin", "$2a$10$FQu86C7r9lm9eBxyC5/MyOiJ7lnb1zmL.8ou1rJ4N1kik.2L0LRAW", "ADMIN");
insert into user
(username, password, role)
values
("user", "$2a$10$7vBOxO17g6yOA8liSe8NOOzVIXg1iQ2M/p2Pu.8/CQAtMbiEdr33e", "USER");
insert into owner
(first_name, last_name)
values
(... | true |
7e0821c7b58f30daac801b0867c330e173ed9794 | SQL | lebedevga/project_cat | /ct-server/calltracking.sql | UTF-8 | 3,039 | 3.078125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.3
-- https://www.phpmyadmin.net/
--
-- Хост: 127.0.0.1:3306
-- Время создания: Окт 21 2019 г., 12:27
-- Версия сервера: 5.6.37
-- Версия PHP: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACT... | true |
54ee5d6b7a58a9d4984d47d707ec83a9d877aa11 | SQL | J-Scag/Flatiron-SQL-Quizzes | /schema.sql | UTF-8 | 608 | 3.3125 | 3 | [] | no_license | CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT
);
CREATE TABLE quizzes (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT
);
CREATE TABLE questions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
content TEXT,
quiz_id INTEGER REFERENCES quizzes
);
CREATE TABLE choices (
id INTEGER PRIMAR... | true |
b307b6073434eb5fcfe0f583a5637d383123b0c4 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day09/select0122.sql | UTF-8 | 262 | 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='WiFiAP' AND sen.id=ci.SENSOR_ID AND ci.INFRASTRUCTURE_ID=ANY(array['2052','5011','2216','5091','1412','4202','5066','5019','3076','6052'])
| true |
86ae5accbaaaa7604eeeb8fa6c605a8a812306ac | SQL | MaksimGer/ApiOnlineStore | /ApiOnlineStore/target/classes/db/migration/V1__Init_DB.sql | UTF-8 | 2,245 | 3.5625 | 4 | [] | no_license | create sequence hibernate_sequence start 1 increment 1;
create table attributes (
id int8 not null,
name varchar(255),
primary key (id)
);
create table categories (
id int8 not null,
name varchar(255),
primary key (id)
);
create table categories_attributes (
categories_id int8 not null,
... | true |
448303a22f3fa555da0911fabe743b3d35a142fd | SQL | bmarchambault/database-exercises | /update_exercises.sql | UTF-8 | 974 | 3.65625 | 4 | [] | no_license | USE codeup_test_db;
--Write SELECT statements to output each of the following with a caption:
--After SELECT add an UPDATE statement
--Add SELECT statements after each UPDATE so you can see the results of your handiwork.
--All albums in your table.
SELECT 'List of all albums in database' AS 'All albums search';
SELEC... | true |
581d142e260d785222cb1f0a16a93017046b7885 | SQL | Miracle1111/dbis | /km61/Chala_Hanna/laboratory5.sql | UTF-8 | 552 | 3.625 | 4 | [] | no_license | -- LABORATORY WORK 5
-- BY Chala_Hanna
create function prod_price (int temp,
order_nums := Orders.order_num%type)
begin
select order_num,
count(quantity*itemprice) as price_sum
from
OrderItems
group by order_num;
if temp != 0 then
stdb = (order_nums = "order_num", temp = "price_sum")
end if;
end;
create procedure or... | true |
ebc5eec692273064dd1ccb5e880e2cdad7bd4e40 | SQL | Brahmi108/orderstore | /modules/core/db/update/postgres/20/200405-2-updateSecUser01.sql | UTF-8 | 172 | 3.296875 | 3 | [] | no_license | alter table SEC_USER add constraint FK_SEC_USER_ON_OWNER foreign key (OWNER_ID) references ORDERSTORE_OWNER(ID);
create index IDX_SEC_USER_ON_OWNER on SEC_USER (OWNER_ID);
| true |
115a10d5598adb17c9775cec44262a83e2526012 | SQL | soo-park/databases | /server/schema.sql | UTF-8 | 1,276 | 3.6875 | 4 | [] | no_license | CREATE DATABASE chat;
USE chat;
/* Create other tables and define schemas for them here! */
CREATE TABLE users (
/* Describe your table here.*/
id int AUTO_INCREMENT NOT NULL PRIMARY KEY,
username varchar(255) NOT NULL
);
CREATE TABLE rooms (
id int AUTO_INCREMENT NOT NULL PRIMARY KEY,
roomname varchar(255... | true |
4fb54eff04c719f819e72accb144eeb58fae4e10 | SQL | Zac-Mwangi/RonaldInc | /php/inc.sql | UTF-8 | 7,490 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 07, 2021 at 11:43 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
12b6d51fdd395939e52e2e637ff47c4079d9a626 | SQL | altamira/visualstudio | /Sistema de Informação Altamira/EGISSQL.Database/dbo/Stored Procedures/Procs1/pr_consulta_cont_serv_reajuste.sql | UTF-8 | 1,774 | 3.546875 | 4 | [] | no_license |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--pr_consulta_cont_serv_reajuste
----------------------------... | true |
e8920a6dd920cc5f37c0ce3aac44b758e0c4daec | SQL | rupathouti/TodoRESTAPI | /todo_app_mysql.sql | UTF-8 | 1,428 | 4.09375 | 4 | [] | no_license | DROP DATABASE IF EXISTS todo;
CREATE DATABASE IF NOT EXISTS todo;
USE todo;
-- drop old versions of users and tasks tables
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS tasks;
-- create users and tasks table
CREATE TABLE users(
id INT NOT NULL AUTO_INCREMENT, -- sql will automatically choose ids for me
ema... | true |
6cd6ab62d660478a883b7c190fc8052c95dcb491 | SQL | SahAssar/uniphant | /TABLES/settings.sql | UTF-8 | 969 | 2.65625 | 3 | [
"MIT"
] | permissive | CREATE TABLE settings (
setting_id integer NOT NULL,
init_credential_relying_party_name text NOT NULL DEFAULT 'ACME Corporation',
init_credential_require_resident_key boolean DEFAULT TRUE,
init_credential_user_verification webauthn.user_verification_requirement NOT NULL DEFAULT 'discouraged',
init_credential_attestatio... | true |
bfa0afe9fac9af94770d468800c5d60804f362bf | SQL | SmileyJo/TechChat | /Database/currdb.sql | UTF-8 | 1,425 | 3.65625 | 4 | [] | no_license | --
-- File generated with SQLiteStudio v3.1.1 on Fri Mar 24 11:44:22 2017
--
-- Text encoding used: UTF-8
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: Conversation
CREATE TABLE Conversation (c_ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, u_One INT (11) NOT NULL REFERENCES Users (User_ID), u_Two INT (11... | true |
bc6f47c6946347a55f366f7cf99c3f8fb4079c67 | SQL | glaubervila/Rebanho | /docs/db_update_008.sql | UTF-8 | 2,889 | 3.609375 | 4 | [] | no_license | ALTER TABLE `clientes` DROP FOREIGN KEY `fk_fornecedores_confinamentos10` ,
ADD FOREIGN KEY ( `confinamento_id` ) REFERENCES `mmagropec`.`confinamentos` (
`id`
) ON DELETE NO ACTION ON UPDATE NO ACTION ;
-- -----------------------------------------------------
-- Table `mmagropec`.`clientes`
-- -----------------------... | true |
c08c48bc04c2f832634ae8907143e9f1cc92b0f1 | SQL | HTTPArchive/almanac.httparchive.org | /sql/2019/mobile-web/12_12.sql | UTF-8 | 873 | 3.78125 | 4 | [
"Apache-2.0"
] | permissive | #standardSQL
# 12_12: Popular input types
CREATE TEMPORARY FUNCTION getInputTypes(payload STRING)
RETURNS ARRAY<STRING> LANGUAGE js AS '''
try {
var $ = JSON.parse(payload);
var almanac = JSON.parse($._almanac);
return almanac['input-elements'] && almanac['input-elements'].map(function(node) {
ret... | true |
95eb637dc0b385434880a0533b6b893efb920d2a | SQL | YairPR/pack-oracle | /libexec/alertlog.sql | UTF-8 | 3,920 | 3.796875 | 4 | [] | no_license | ---------------------------------------------------------------
-- PLEASE CHANGE SYSTEM ACCOUNT TO ANOTHER DEDICATED ACCOUNT --
---------------------------------------------------------------
-- PLEASE CHANGE SYSTEM ACCOUNT TO ANOTHER DEDICATED ACCOUNT --
---------------------------------------------------------------
... | true |
7ceb43b29b646a44573f594cbc7e2eb398a5ff82 | SQL | rodrigolopezramoss/Coleccionables-Metroid | /Crud_v1/web/col_metroid.sql | UTF-8 | 2,778 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 23-08-2014 a las 11:18:07
-- Versión del servidor: 5.5.38-0ubuntu0.14.04.1
-- Versión de PHP: 5.5.9-1ubuntu4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @O... | true |
b0983f58c4a46419067af95937bb60cb9e9d1a28 | SQL | Riceyo/QA-Consulting-ONS-Academy | /PL SQL/procedure_rowtype_cursor_loop.sql | UTF-8 | 381 | 2.6875 | 3 | [] | no_license | create or replace procedure procrowtype
is
qarow qa % rowtype;
cursor cursorrow is select * from qa;
begin
open cursorrow;
loop
fetch cursorrow into qarow;
exit when cursorrow % notfound;
dbms_output.put_line(qarow.name);
dbms_output.put_line(qarow.grp);
dbms_output.put_line(qarow.area);
... | true |
8034989391c4a22f8f8036c500868899c95acbb5 | SQL | happystjava/Security_Codes | /漏扫系列/Code/lang_scan_0.98系列/备份文件/备份/mysql.sql | GB18030 | 2,572 | 3.359375 | 3 | [] | no_license | create database Yolanda_information_collection_02;
use Yolanda_information_collection_02;
#ݿ
#INSERT into url_index(url,urlget,datatime) select 'www.123123.com','0','2018' from dual where 'www.123123.com' not in (select url from url_index);
#sql = "INSERT INTO url_index(url,urlget,datatime) select '%s','%s','%s' fro... | true |
8b58be3f615c33f9e900c62516bb8ea2bd802def | SQL | fleetmack/mines | /me/Alumni Association/nick/20091201_grad_students_who_are_alums_and_currently_enrolled_by_dept.sql | UTF-8 | 646 | 3.75 | 4 | [] | no_license | --gives counts by department of currently enrolled grad students who are also alums
select primary_1st_department_desc, count(*)
from temp_mack_all_students
where student_classification = 'GR'
and id_number IN
(select id_number from entity_record_type where record_type_code = 'AL')
group by primary_1st_department_... | true |
96f9d1bafe0d29cf2371abd3ee5b2aeca191f3d3 | SQL | VictorIstratii151/Databases | /lab7/alter_view_pcs.sql | UTF-8 | 117 | 2.640625 | 3 | [] | no_license | ALTER VIEW dbo.view_pcs
WITH SCHEMABINDING
AS
SELECT model, ram, cd
FROM dbo.pc_uri
WHERE ram > 32
WITH CHECK OPTION | true |
012e7b0ea268990a5f1dc674b1e01c5fa78727a3 | SQL | chaudard/php | /TP/minichatcorrection1/minichat.sql | UTF-8 | 2,467 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Mar 14 Mars 2017 à 23:52
-- Version du serveur : 5.7.14
-- Version de PHP : 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
9d26a21ebb345529767c694ad244f9fc327756c3 | SQL | LauraPerinet/Orphee | /site/orphee2-1.sql | UTF-8 | 10,722 | 3.125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.4.15.9
-- https://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Dim 06 Mai 2018 à 19:51
-- Version du serveur : 5.6.37
-- Version de PHP : 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.