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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e544aa4d81491d8bf6483e0384f601e54cd59699 | SQL | mmarkou/stemming | /scripts/SQLQuery1.sql | UTF-8 | 221 | 2.703125 | 3 | [] | no_license |
UPDATE paper
SET AbstractWithoutQuotes=LEFT(AbstractWithoutQuotes, CHARINDEX('©',AbstractWithoutQuotes)-2)
WHERE AbstractWithoutQuotes LIKE '%©%'
update dbo.paper
SET StemmedAbstract =LTRIM(RTRIM(StemmedAbstract))
| true |
186460a7310af30eb6df312413eab8a21e1324b1 | SQL | mayoricodevault/riot-core-services | /src/main/resources/cassandra_db_init.cql | UTF-8 | 2,076 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive |
CREATE TABLE field_value_history (
field_id bigint,
at timestamp,
value text,
x float,
y float,
PRIMARY KEY(field_id,at)
) WITH gc_grace_seconds = 1;
CREATE INDEX ON field_value_history(x);
CREATE INDEX ON field_value_history(y);
CREATE TABLE field_value_history2 (
field_type_id bigint, //... | true |
ec3dd9de95ce63123b74c7b61694ab2d0134f4c1 | SQL | mbit-cloud/spring-data-mirage | /src/main/resources/org/springframework/data/mirage/repository/baseSelect.sql | UTF-8 | 444 | 3.5625 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SELECT *
FROM /*$table*/some_table
/*BEGIN*/
WHERE
/*IF id != null*/
/*$id_column_name*/id = /*id*/10
/*END*/
/*IF ids != null*/
/*$id_column_name*/id IN /*ids*/(10, 20, 30)
/*END*/
/*IF absid != null*/
AND ABS(/*$id_column_name*/id) = /*absid*/10
/*END*/
/*END*/
/*IF orders != null*/
ORDER BY /*$orders*/i... | true |
0aa4a2dad22decedc44d375c7cf84bc76a233d79 | SQL | lunaliwen/bamazon | /bamazon.sql | UTF-8 | 1,428 | 3.21875 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
CREATE TABLE products(
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(100) NOT NULL,
department_name VARCHAR(45) NOT NULL,
price INT default 0,
stock_quantity INT default 0,
PRIMARY KEY (item_id)
);
INSERT INTO products (pr... | true |
ed8229e8b7ebfa59b015565a56448da5e7172a14 | SQL | cn-panda/JavaCodeAudit | /【02】SQL 漏洞原理与实际案例介绍/ofcms/ofcms-admin/src/main/resources/conf/sql/system/log.sql | UTF-8 | 911 | 3.203125 | 3 | [
"MIT"
] | permissive | #sql("query")
select * from of_sys_oper_log where status = '1'
#if (oper_date??) and oper_date = #para(oper_date)#end
#if (user_name??) and user_name like concat('%', #para(user_name), '%')#end
#if (sort?? && field) order by order_field order_sort #else order by logid desc #end
#end
#sql("detail")
s... | true |
dea6afe986a6d124c7287f4dd75d661758355730 | SQL | ThomasMalfilatre/PlanningBundle | /DBgelot.sql | UTF-8 | 2,228 | 3.1875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.1.5
-- http://www.phpmyadmin.net
--
-- Client : info2
-- Généré le : Mar 11 Février 2014 à 10:16
-- Version du serveur : 5.5.24-4-log
-- Version de PHP : 5.4.9-4ubuntu2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@... | true |
67edaf234227ba75eb25f432d6fd303a9612ee7f | SQL | not-yet-define/resturent-DF-pipe | /ddl.sql | UTF-8 | 8,768 | 3.65625 | 4 | [] | no_license | -- check table definition
select *
from information_schema.columns
where table_schema = 'exposed'
and table_name = 'order_line_96586';
-- create tables in azure sql database
create table order_line_history
(
id bigint,
bill_id bigint,
store_id bigint,
store_nam... | true |
d74db30aa716ede63a8421b58b77f35715805a94 | SQL | xianfengxiong/finance-data | /fund/src/main/script/fund.sql | UTF-8 | 2,179 | 3.8125 | 4 | [
"Apache-2.0"
] | permissive |
# fund 数据库
CREATE DATABASE IF NOT EXISTS fund DEFAULT CHARACTER SET utf8;
USE fund;
# 基金基本信息
CREATE TABLE fund_basic_info(
`id` BIGINT AUTO_INCREMENT,
`code` VARCHAR(10) NOT NULL COMMENT '基金代码',
`found_date` DATE COMMENT '成立日期',
`short_name` VARCHAR(50) COMMENT '基金简称',
`full_name` VARCHAR(100) COMMENT '基金... | true |
1c149d1ef07d0293057d6fb782a88c26673035e8 | SQL | pilot3554/TDC-SQL-Scripts | /Scripts/report - KDM email counts.sql | UTF-8 | 794 | 3.625 | 4 | [] | no_license | -- select top 10 * from dbo.tblKeyGenJobs
select top 10 *
from dbo.KdmDeliveryHistory order by 1 desc
select top 10 *
from dbo.KdmDeliverySetting
select top 10 *
from dbo.tblTheatres
select top 10 c.country, *
from KdmDeliveryHistory a with (nolock)
inner join KdmDeliverySetting b with (nolock) on a.kdmdeliverysett... | true |
b8605506e2714d7bbb233105795bdbfa29c5a74e | SQL | santiReynaga97/ViewBiblioteca | /biblioteca.sql | UTF-8 | 4,269 | 3.53125 | 4 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-07-2017 a las 17:14:15
-- Versión del servidor: 10.1.24-MariaDB
-- Versión de PHP: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... | true |
650dece7b8fc540a80712be83b1de5a7f52060c0 | SQL | taufiqsejati/WebDevelopment | /mp3sekolah/db_sekolah.sql | UTF-8 | 4,907 | 3.140625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 01, 2019 at 12:28 PM
-- Server version: 5.7.14
-- PHP Version: 7.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... | true |
8d45792e0b1820532502ee7dee907eb71ea23f2e | SQL | openapi-onestore/sample-web-admin | /sample-web/src/main/resources-development/embedded/sql/schema.sql | UTF-8 | 1,181 | 2.5625 | 3 | [] | no_license | CREATE TABLE file_payment_table (
`mid` varchar(45) NOT NULL,
`billing_token` varchar(45) DEFAULT NULL,
`product_id` varchar(45) DEFAULT NULL,
`product_name` varchar(45) DEFAULT NULL,
`order_no` varchar(45) DEFAULT NULL,
`amt_request_purchase` varchar(45) DEFAULT NULL,
`amt_carrier` varchar(45) DEFAULT NU... | true |
d734c87fa6fdbc83e99b3108946fb2ee445b7568 | SQL | dandockery/csci3410_mysql | /procedure_example.sql | UTF-8 | 1,447 | 4 | 4 | [] | no_license | use Chattahoochee;
-- temporarily change the delimiter to something else
delimiter //
-- this procedure will perform 4 statements to process
-- items in the shopping cart
DROP PROCEDURE IF EXISTS processShoppingCart;
CREATE PROCEDURE processShoppingCart (
IN CustomerID INT,
IN AddressID INT
)
BEGIN
-- create th... | true |
cf04bbd0dfb78ac4ca8dddbba8e33c025ecf5d1c | SQL | Tianranxu/wg | /database/138_create_table_of_pay_type_temp.sql | UTF-8 | 658 | 3.53125 | 4 | [] | no_license | DROP TABLE IF EXISTS `fx_pay_type_temp`;
CREATE TABLE `fx_pay_type_temp` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID' ,
`pay_id` int(11) UNSIGNED NOT NULL COMMENT '支付表ID' ,
`type` tinyint(2) UNSIGNED NOT NULL DEFAULT 1 COMMENT '付款方式 1-现金 2-刷卡 3-银行转账 99-其他,默认为1' ,
`remark` varchar(500) CHARACTER S... | true |
78c10d668bb65515f273f3922d236af08e7a12e8 | SQL | bellmit/origin | /family_order/sql/NormalPara/td_m_depart_openagent.sql | UTF-8 | 365 | 3.15625 | 3 | [] | no_license | --IS_CACHE=Y
select /*+INDEX(a IDX_TD_M_DEPART_RSVALUE2)*/ depart_code PARACODE,depart_name PARANAME
from td_m_depart a
where rsvalue2=:TRADE_EPARCHY_CODE
and validflag='0'
and start_date<=sysdate
and end_date>=sysdate
and exists (select 1 from td_m_departkind b
where b.depart_kind_code=a.depart_kin... | true |
acd82a65c212956e8757994e30562b7fb4af82cc | SQL | amunhotep/lib-th001 | /IDE/ERP/DBO/SQL/OBJECTEDITOR/LINKS_SEL.SQL | UTF-8 | 1,984 | 3.515625 | 4 | [] | no_license | EXECUTE BLOCK (
Q_OBJ_ID TYPE OF COLUMN TABL$_TB.ID = ?OBJ_ID
,Q_OBJ_TYPE TYPE OF COLUMN TABL$_TB.BASE_TYPE_ID = ?OBJ_TYPE
)RETURNS (
OBJ_ID TYPE OF COLUMN TABL$_TB.ID
,OBJ_TYPE TYPE OF COLUMN TABL$_TB.BASE_TYPE_ID
,TYPE_ID TYPE OF COLUMN TABL$_TB.TYPE_ID
,T... | true |
413e46657278ec70063c4a375767dd163b56ab4c | SQL | spitrola/BookStoreDatabase | /A5.sql | UTF-8 | 8,581 | 4.4375 | 4 | [] | no_license | /*
File: A5.sql, Winter 2014, Comp2521, A5
Prepared On: April 11, 2014
Prepared By: Sonia Pitrola
*/
\! rm -f A5.log
tee A5.log
-- setting foreign key checks to zero
SET foreign_key_checks = 0;
-- Dropping tables
DROP TABLE IF EXISTS User;
DROP TABLE IF EXISTS Book;
DROP TABLE IF EXISTS Author;
DROP TABLE IF EXIST... | true |
c338bfa3af61666ac58042d0e34aef264f2dc069 | SQL | ItzGuuh/Musitec | /MusitecOficial 2.1/Banco Musitec 3.0.sql | UTF-8 | 35,705 | 3.46875 | 3 | [] | no_license | create database Musitec;
use Musitec;
create table Cadastro (
idCadastro integer not null auto_increment,
Login varchar(30) unique,
NomeCompleto varchar(30),
Email varchar(30),
sexo CHAR(1) CHECK(sexo IN ("M", "F")),
DataNasc date,
Senha varchar(16),
PRIMARY KEY(idCadastro)
);
create table Instrument... | true |
14056f833a0c420a20b61b4cdc579827a06e2563 | SQL | LuLStackCoder/mai-sql-course | /13pythonpredict/pythonpredict.sql | UTF-8 | 1,050 | 3.703125 | 4 | [] | no_license | def moving_average(d1: str, d2: str, alpha: float=0.2)->pd.DataFrame:
SQL = '''
SELECT C.city c, R2.goods g, R.ddate d, sum(R2.price * R2.volume) s
FROM recept R
JOIN recgoods R2 ON R.id = R2.id
JOIN client C ON R.client = C... | true |
751ac47bdc0aee44db2175e01c15c92cf36c4713 | SQL | ejoo1109/TeamCoffeeCup | /TeamProjectCoffee/news.sql | UTF-8 | 228 | 2.921875 | 3 | [] | no_license | -- NEWS 테이블
create table news_tbl(
newsno number(10),
newstitle varchar2(200) not null,
newscontent varchar2(2000) not null,
newsregdate date default sysdate,
newsviewcnt int,
CONSTRAINT pk_news_tbl PRIMARY KEY (newsno)
); | true |
9579e11a5c9a9c9bc45bc8da3cf9d7edaf66975e | SQL | OSGP/open-smart-grid-platform | /osgp/platform/osgp-core/src/main/resources/db/migration/V20170724133131789__Adds_Light_Measurement_Device_table.sql | UTF-8 | 1,759 | 3.671875 | 4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | DO
$$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM pg_tables
WHERE schemaname = current_schema
AND tablename = 'light_measurement_device') THEN
-- Create the table for light_measurement_device along with the proper permissions
CREATE TABLE light_measurement_device (
id BIGINT NOT NULL,
... | true |
9c86acd0191b7b19c042c2ef61013f9c414de722 | SQL | altfatterz/data-access | /src/test/resources/schema.sql | UTF-8 | 1,107 | 3.8125 | 4 | [] | no_license | DROP TABLE IF EXISTS restaurants;
DROP TABLE IF EXISTS addresses;
DROP TABLE IF EXISTS reviews;
CREATE TABLE addresses (
id IDENTITY,
street_name VARCHAR(100) NOT NULL,
street_number INT NOT NULL,
postcode VARCHAR(10) NOT NULL,
city VARCHAR(50) NOT NULL,
version INT NO... | true |
658004f0e7d768518b750881afe5ca8b221020a8 | SQL | mtvbrianking/PSNotify | /php-mysql/psnotfiy.sql | UTF-8 | 1,541 | 3 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jun 07, 2015 at 04:57 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
b953b072316e2d8e3d751b92e083a38ddbb16b27 | SQL | JKempel13/database-exercises | /select_exercises.sql | UTF-8 | 550 | 3.359375 | 3 | [] | no_license | USE codeup_test_db;
SELECT name AS 'The name of all albums by Pink Floyd.' from albums WHERE artist = 'Pink FLoyd';
SELECT release_date AS 'The year Sgt. Pepper''s Lonely Hearts Club Band was released' from albums WHERE name = 'Sgt. Pepper''s Lonely Hearts Club Band';
SELECT genre AS 'The genre for Nevermind' from albu... | true |
03c1ae039b089a08627603791be0407fd683b352 | SQL | nguyenhuuthinhvnpl/INFO_6210 | /Project/Jobs_DB_Project/SQL/question6.sql | UTF-8 | 282 | 2.890625 | 3 | [
"MIT"
] | permissive | SELECT word
, COUNT(*) total
FROM ( SELECT DISTINCT id
, SUBSTRING_INDEX(SUBSTRING_INDEX(text,' ',i+1),' ',-1) word
FROM love1, ints
) x
GROUP
BY word
HAVING COUNT(*) > 1
ORDER
BY total DESC
, word;
| true |
1c8d631b0662589c7cf16bb821c64834172890f7 | SQL | kgtdbx/OracleScript | /merge_other.sql | WINDOWS-1251 | 2,452 | 4.1875 | 4 | [] | no_license | /*
- . , , Update, - Insert. Update, .
DML!
*/
--
MERGE INTO TABLE_NAME
USING table_reference ON (condition) WHEN MATCHED
THEN UPDATE SET column1 = value1 [, column2 = value2 ...] WHEN NOT MATCHED
THEN INSERT (column1 [, column2 ...]) VALUES (value1 [, value2 ...) ;
-- MERGE... | true |
7b77ee5fb7e8f3957f45eca13c8237242f4cfcbf | SQL | radtek/abs3 | /sql/mmfo/bars/Table/tmp_sw102_ref.sql | UTF-8 | 2,025 | 2.90625 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/TMP_SW102_REF.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
4c449ad4a37a64962ab4acb5bf24f1f67ac312c8 | SQL | molokovskikh/af_admininterface | /migrations/438_00_check_send_to_minimail.sql | UTF-8 | 267 | 3.15625 | 3 | [] | no_license | update Billing.Payers p
set p.SendToMinimail = 1
where (select count(*) from Billing.PayerClients pc
join Future.Clients c on c.Id = pc.ClientId
join Future.Users u on u.ClientId = c.Id
where pc.PayerId = p.PayerId and c.Status = 1 and u.Enabled = 1) <= 3;
| true |
cb0a02729b993dfd6ded7ffd098c2697263cf10b | SQL | zhou122/otherProjects | /tkmybatis/src/main/resources/db/schema-h2.sql | UTF-8 | 342 | 2.65625 | 3 | [] | no_license | DROP TABLE IF EXISTS t_user;
CREATE TABLE t_user
(
id BIGINT(20) NOT NULL COMMENT '主键ID',
old_name VARCHAR(30) NULL DEFAULT NULL COMMENT '老姓名',
new_name VARCHAR(30) NULL DEFAULT NULL COMMENT '新姓名',
age INT(11) NULL DEFAULT NULL COMMENT '年龄',
email VARCHAR(50) NULL DEFAULT NULL COMMENT '邮箱',
PRIMARY KEY (id)
); | true |
1646dc8885f5b97d045626daf026f56c2f787723 | SQL | narogm/bazyII | /1_oracle/8_trigery.sql | UTF-8 | 1,508 | 3.609375 | 4 | [] | no_license | CREATE OR REPLACE TRIGGER dodanie_rezerwacji
AFTER INSERT
ON REZERWACJE
FOR EACH ROW
BEGIN
INSERT INTO REZERWACJE_LOG (ID_REZERWACJI, DATA, STATUS)
VALUES (:NEW.NR_REZERWACJI, CURRENT_DATE, :NEW.STATUS);
UPDATE WYCIECZKI w
SET LICZBA_WOLNYCH_MIEJSC = LICZBA_WOLNYCH_MIE... | true |
fdf363d54e20bb3cb5d63c5d72dc59b48f19e1eb | SQL | HyunupKang/StudySQLServer | /210518/Test4.sql | UTF-8 | 162 | 3.25 | 3 | [] | no_license | SELECT m.Names, m.Levels, m.Addr
, r.rentalDate
FROM membertbl AS m
LEFT OUTER JOIN rentaltbl AS r
ON m.Idx = r.memberIdx
WHERE r.rentalDate IS NULL | true |
8e39aab4d020e2b5ba298dd5e9fb768f28ec77a4 | SQL | arbiterli/qs | /server/src/main/sql/schema/update/.svn/text-base/20130124_01.sql.svn-base | UTF-8 | 4,266 | 3.171875 | 3 | [] | no_license | /*
SQLyog Community Edition- MySQL GUI v8.17
MySQL - 5.1.37-community : Database - qualitysystem
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FO... | true |
5a43e6d04a32d4d57714612f4df247960cb43836 | SQL | christiandeangelis/meetpad-public | /cdst-business/conferenza/src/main/resources/db/migration/V1.062__vitomario_rubrica_richiedenti_open_fiber.sql | UTF-8 | 1,827 | 2.953125 | 3 | [] | no_license | DO
$do$
BEGIN
if NOT EXISTS(SELECT codice_fiscale FROM cdst.persona WHERE codice_fiscale = 'MGLVMR62D30C283E') THEN
INSERT INTO cdst.persona(
codice_fiscale, cognome, email, nome)
VALUES ('MGLVMR62D30C283E', 'Magliaro', 'vitomario.magliaro@openfiber.it', 'Vito Mario');
END IF;
if NOT EXISTS(SELECT * FROM cdst.rubri... | true |
19a1bdca4430b563d3c0c8afa87d5a01a911418f | SQL | goingmywaynet/Obento | /DB/testdata/ObentoTestData.sql | UTF-8 | 4,783 | 2.65625 | 3 | [] | no_license | -- 課マスタ
INSERT INTO M_SECTION (section_id, section_name) VALUES ('1', 'スマイル課');
INSERT INTO M_SECTION (section_id, section_name) VALUES ('2', 'どきどき課');
INSERT INTO M_SECTION (section_id, section_name) VALUES ('3', 'ハピネス課');
-- 利用者マスタ
INSERT INTO M_USER (user_id, section_id, user_name, enable_flag) VALUES ('1',... | true |
129a977d0c8c56850d8fee1267ba78dab3a4a55c | SQL | filipeoliveirah/php-default-project | /res/sql/tables/tb_placescoordinates.sql | UTF-8 | 488 | 2.78125 | 3 | [] | no_license | CREATE TABLE `tb_placescoordinates` (
`idplace` int(11) NOT NULL,
`idcoordinate` int(11) NOT NULL,
`dtregister` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
KEY `idplace` (`idplace`),
KEY `idcoordinate` (`idcoordinate`),
CONSTRAINT `tb_placescoordinates_ibfk_1` FOREIGN KEY (`idplace`) REFERENCES `tb_places... | true |
7af3b1f2eef07aabc0ac84f2cc724b42c8f417b0 | SQL | vijaykiran/hopsworks | /metadata_indexing/Elastic_Rivers_Child.sql | UTF-8 | 8,025 | 4.4375 | 4 | [
"Apache-2.0"
] | permissive | -- TAKE A BATCH OF RECORDS BLINDLY INTO THE BUFFER TABLE (deprecated. Use the one below instead)
INSERT INTO hopsworks.meta_inodes_ops_children_deleted (inodeid, parentid, processed)
(SELECT hops.hdfs_metadata_log.inode_id, hops.hdfs_metadata_log.dataset_id, 0 FROM hops.hdfs_metadata_log LIMIT 100);
-- SELECTIVELY ... | true |
53f82f4789b96fd209ad15df9645e2703b5aa515 | SQL | puwelous/AMEISELangTranslations | /vf_addQuery.sql | UTF-8 | 26,961 | 2.8125 | 3 | [] | no_license | /* NEU */
INSERT INTO rule(rlid,zort,basic_op,value_ref_point,text_ref_point)
VALUES (2000,'T','!=',null,'1901/01/01/00:00');
INSERT INTO rule(rlid,zort,basic_op,value_ref_point,text_ref_point)
VALUES (2001,'T','==',null,'1901/01/01/00:00');
INSERT INTO query(qid,attribute,statement,z_path)
VALUES (2000,'Beginn der E... | true |
d6461644b99d83a635eba403405fea43c4ffa0c5 | SQL | mjoris/ws-ss-course-materials | /assets/07/examples/status.sql | UTF-8 | 857 | 2.875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 05, 2010 at 05:26 PM
-- Server version: 5.1.37
-- PHP Version: 5.2.11
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `status`
--
DROP DATABASE IF EXISTS status;
CREATE DATABASE status DEFAULT C... | true |
01f73a5ec7cb5788df79a89f35831530c3b4bdca | SQL | dwicahyo-dev/kiosk_pesantren | /kiosk_pesantren.sql | UTF-8 | 11,257 | 3 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Aug 13, 2019 at 01:34 PM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.3.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
c4b4c0d15d61777bce8b83cffc06f16b91f90e81 | SQL | stevemendozajr/sql-scripts | /SakilaHomeworkStephen.sql | UTF-8 | 3,878 | 4.1875 | 4 | [] | no_license | -- use database
USE sakila;
-- la
SELECT first_name, last_name
FROM actor;
-- 1b
SELECT concat(first_name,' ',last_name) AS Actor
FROM actor;
-- 2a
SELECT *
FROM actor
WHERE first_name='Joe';
-- 2b
SELECT *
FROM actor
WHERE last_name LIKE '%GEN%';
-- 2c
SELECT *
FROM actor
WHERE last_name LIKE '%LI%'
ORDER BY las... | true |
13d8b5e152508cc92f967a2d75629d3254a65d84 | SQL | AbdurRoufBD/Travel-Agency-Web-App | /Travel-Mate-project-database.sql | UTF-8 | 28,223 | 3.15625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 26, 2019 at 10:58 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
6c0261ecf1fe27a6fcf4716c099461224e9021ae | SQL | juliesof/wdi_2_ruby_sql_lab_hogwarts | /schema.sql | UTF-8 | 1,544 | 3.828125 | 4 | [] | no_license | DROP DATABASE IF EXISTS hogwarts;
CREATE DATABASE hogwarts;
\c houses;
-- Schools of magic consist of several `houses`. Houses have these properties:
-- * name
-- * animal (lion, badger, etc.)
-- * points (awarded or subtracted by teachers)
CREATE TABLE houses (
id SERIAL PRIMARY KEY,
name TEXT,
animal TEXT,... | true |
eeb535ea6eb057e120032a7fbc02f56e0b682af5 | SQL | xotrs/order-api | /src/main/java/com/cherrypick/order/sql/init.sql | UTF-8 | 2,629 | 3.359375 | 3 | [] | no_license | CREATE TABLE `member`
(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`nick_name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`pa... | true |
9c046ac7a8ad43379ed1d8849c1bb408ab9a2fd5 | SQL | Jzacha21/secure-account-recovery | /src/main/resources/sql/schema_h2.sql | UTF-8 | 917 | 3.625 | 4 | [] | no_license | CREATE TABLE IF NOT EXISTS
USERS (
ID BIGINT AUTO_INCREMENT PRIMARY KEY,
USERNAME VARCHAR(50) NOT NULL,
PASSWORD VARCHAR(60) NOT NULL,
ENABLED BOOLEAN NOT NULL,
FIRST_NAME VARCHAR(50) NOT NULL,
LAST_NAME VARCHAR(50) NOT NULL,
EMAIL VARCHAR(50) NOT NULL,
UNIQUE KEY USERNAME_UNIQU... | true |
5cda3ff34d897be6edb0b7cb412185825534d2f2 | SQL | jgarzonext/packages | /function/F_OBJASE.sql | UTF-8 | 985 | 2.59375 | 3 | [] | no_license | --------------------------------------------------------
-- DDL for Function F_OBJASE
--------------------------------------------------------
CREATE OR REPLACE EDITIONABLE FUNCTION "AXIS"."F_OBJASE" (IP_COBJASEG IN VARCHAR2, IP_CSUBOBJASEG IN VARCHAR2,
IP_COBJASE IN OUT NUMBER, IP_TFUNCIO IN OUT VARCHAR2, IP_CCLAR... | true |
3226fcd192e5fc49595ab30b8641553958b533d6 | SQL | stevenscg/CakePHP-OAuth2-Server-Plugin | /tables.sql | UTF-8 | 1,093 | 3.09375 | 3 | [
"WTFPL",
"MIT"
] | permissive | DROP TABLE IF EXISTS `o_auth2_server_clients`;
CREATE TABLE `o_auth2_server_clients` (
`id` char(20) NOT NULL,
`secret` char(20) NOT NULL,
`redirect_uri` varchar(200) NOT NULL,
`description` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 DEFAULT COLLATE=utf8_unicode_ci;
D... | true |
514a6bb05b0520d1fba4e1f503a4fbf281e98721 | SQL | Grigorii-Ilin/Databases | /lab2/7 SELECT aggregation.sql | WINDOWS-1251 | 389 | 3.671875 | 4 | [] | no_license |
--7. SELECT, .
SELECT AVG(TotalPrice) AS 'Default AVG',
SUM(TotalPrice)/COUNT(OrderID) AS 'Calculated AVG'
FROM
(SELECT OrderID, SUM(o.UnitPrice*o.Quantity*(1-o.Discount)) AS TotalPrice
FROM [Northwind].dbo.[Order Details] AS o
GROUP BY OrderID
) AS TotOrders
| true |
af3d6c79098074c0a764193db9ea7ee8bbf24acc | SQL | huaxueyihao/practise-project | /sbs0819/boot-bmodule01/src/main/resources/db/schema.sql | UTF-8 | 666 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | drop table if exists sys_user;
-- 用户
create table sys_user (
id bigint(20) primary key auto_increment,
user_name varchar(20) not null comment '用户名',
password varchar(32) not null comment '密码',
sex varchar(1) default '0' comment '0-男,1-女,2-位置',
age int(3) comment '年龄'
);
-- 菜单
drop table if exists sy... | true |
3711bcdbfb7d88539837b20e17982cf355d94ae7 | SQL | hw79chopin/MySQL-Codebook | /SQL 스터디/중급/105.sql | UTF-8 | 274 | 3.140625 | 3 | [] | no_license | -- 데이터의 품질 높이기 (UNIQUE)
-- Q. UNIQUE 제약을 ID 칼럼에 주세요
CREATE TABLE emp
(empno INT UNIQUE,
ename VARCHAR(20));
-- 기존 테이블에 UNIQUE 제약 추가
ALTER TABLE 테이블명
ADD CONSTRAINT 칼럼이름 UNIQUE (칼럼이름); | true |
64ffa2e6f9c433f815ffd2c7923c3bbd2b0c4b3a | SQL | moneymashi/SVN_fr.class | /homework/WebContent/a11_parkyunha/[0321]hw.sql | UHC | 3,216 | 4.4375 | 4 | [] | no_license | /*
1
ο üũϼ.
1000̸ (ְġ, ġ, ġ)
~2000̸
~3000̸
~4000̸
~5000̸
~6000̸
*/
select * from emp;
select
trunc(sal, -3)+1000||' ̸' ,
count(*) ,
max(sal) ְġ,
min(sal) ġ,
avg(sal) ġ
from emp
group by
trunc(sal, -3)
order by
trunc(sal, -3);
/*
2
μġ Ʒ ϼ.
μġ
[ ORACLE ] ORA-00979: GROUP ... | true |
06e363e66de8342dfebe686c65674ed1f60cdedd | SQL | vein2017/MySQL | /szolgaltato.sql | UTF-8 | 2,796 | 3.171875 | 3 | [] | no_license | DROP TABLE IF EXISTS szolgaltato ;
DROP TABLE IF EXISTS ugyfel ;
DROP TABLE IF EXISTS szolgaltato_ugyfel ;
CREATE TABLE szolgaltato
(
szolgaltato_id INTEGER ,
szolgaltato_nev VARCHAR(30) ,
web VARCHAR(30) ,
ugyfelszolgalat VARCHAR(35)
) ;
INSERT INTO szolgaltato VALUES(1,'T-COM' ,"WWW.... | true |
908cbd43f244e73b15c1bd8a311dfc2275f6b771 | SQL | Luddini/Test-Technique-stage-NestJS | /prisma/migrations/20210530115836_init/migration.sql | UTF-8 | 1,895 | 3.75 | 4 | [] | no_license | /*
Warnings:
- You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropTable
DROP TABLE "User";
-- CreateTable
CREATE TABLE "user" (
"id" SERIAL NOT NULL,
"username" VARCHAR(255) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE ... | true |
f53d40b5deb95f04d0645272bf81bcf57c2f3074 | SQL | queirozsc/Automation-Scripts | /SQL/Smart/Relatórios Smart/CSI_Exportacao_Fluxo_de_Caixa.sql | UTF-8 | 4,663 | 3.5 | 4 | [] | no_license | select
cfg.cfg_emp, tmp1.empresa,tmp1.documento,tmp1.data,tmp1.competencia,tmp1.cfo_cod,
tmp1.classificacao,tmp1.historico,tmp1.movimento,
tmp1.entradas,tmp1.saidas,
case
when cfo_codigo_conta is null then tmp1.conciliadoem
else tmp2.cfo_conciliadoem end as conciliadoem,
case
when cfo_codigo_conta is null... | true |
9dd619c907e6b5322d8b63b4d7951ba743bd98ba | SQL | supermanxkq/projects | /Swing/BookManager/document/db_book.sql | UTF-8 | 2,629 | 3.515625 | 4 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50027
Source Host : localhost:3306
Source Database : db_book
Target Server Type : MYSQL
Target Server Version : 50027
File Encoding : 65001
Date: 2016-01-28 16:07:28
*/
SET FOREIGN_KEY_CHECKS=0;
-- -... | true |
bd176480ef50e6f4f8e4aa5ea22b8a839b258fa3 | SQL | trajan4k6/acv | /models/l20_marts/feedbackify/feedbackify_dimension_region.sql | UTF-8 | 364 | 2.5625 | 3 | [] | no_license | {{ config(materialized='table') }}
SELECT
{{ dbt_utils.surrogate_key(
[5,'n.LOCATION']
) }} AS DIMENSION_REGION_KEY,
LOCATION AS REGION_NAME,
5 AS DATASOURCE_ID
FROM
{{ source('feedbackify', 'net_promoter_score') }} n
WHERE... | true |
8d1bd765f2b9ec4297785c8117ea79bea5c1f93a | SQL | MichaelHarrid/THE-DATABASE | /file/sql_file/sms.sql | UTF-8 | 10,372 | 3.0625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 30, 2020 at 05:36 AM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
e1975066ee5588daa7009dcd67c5bdde8db6913d | SQL | ferasit87/mediaopttest | /Mediaopt.sql | UTF-8 | 4,946 | 3.015625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 18, 2016 at 04:07 AM
-- Server version: 5.6.31
-- PHP Version: 5.5.38
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ... | true |
8fd576e88d7552c0cac4341a77d397a0fb7db21d | SQL | SeunAdelekan/inmos-api | /db.sql | UTF-8 | 2,081 | 3.90625 | 4 | [
"MIT"
] | permissive | -- Database: inmos
-- DROP DATABASE IF EXISTS inmos;
-- CREATE DATABASE inmos;
-- COMMENT ON DATABASE inmos
-- IS 'inmos database';
-- Table: store
-- DROP TABLE IF EXISTS store CASCADE;
CREATE TABLE IF NOT EXISTS store (
store_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
store_name TEXT NOT NULL UNIQUE,
... | true |
86b86b29c6024b17b870d218d04b206c000eeba0 | SQL | xiaozan-dev/relational-query-optimizer | /resources/sql_query/query06.sql | UTF-8 | 574 | 3.71875 | 4 | [] | no_license | UPDATE LINEITEM SET shipdate=date('1997-05-14') WHERE shipdate>=date('1997-05-02') AND shipdate<date('1997-05-14');
select lineitem.shipmode, count(distinct orders.orderkey)
from orders, lineitem
where orders.orderkey = lineitem.orderkey
and (lineitem.shipmode='AIR' or lineitem.shipmode='MAIL' or lineitem.shipmode='TRU... | true |
190cb985ebb2c4d55bda6e02497ebbb2d6370008 | SQL | omarjcm/ssp | /codigo/versiones/v4.7.1.1/procedures/ssp_consultar_total_tipo_registro.sql | UTF-8 | 509 | 3.875 | 4 | [] | no_license | DELIMITER $$
DROP PROCEDURE IF EXISTS `ssp`.`ssp_consultar_total_tipo_registro` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `ssp_consultar_total_tipo_registro`(fecha1 DATE, fecha2 DATE, tipo_ VARCHAR(30))
BEGIN
SET AUTOCOMMIT = 0;
SELECT SUM(r.valor)
FROM registro r, descripcion d, registrodescripcion rd
... | true |
695663effecc1c1be62419e3323d75e9ba15b804 | SQL | pavel-voinov/oracle-dba-workspace | /scripts/sysdba/i/create_schema.sql | UTF-8 | 621 | 2.546875 | 3 | [
"MIT"
] | permissive | set serveroutput on size 1000000 verify off feedback off timing off termout on echo off
ACCEPT p_schema PROMPT 'Enter username: '
column pwd new_value pwd
column tbs new_value tbs
set termout off
SELECT lower('&p_schema') as pwd, substr(upper('&p_schema'), 1, 27) || '_DATA' as tbs FROM dual;
set termout on
ACCEPT p_pa... | true |
3c9fc222bda7c99d4b6d0ab97a18866aafed74de | SQL | bernardkung/greenbig | /GreenBig.Triggers.1.0.0.sql | UTF-8 | 2,678 | 3.703125 | 4 | [] | no_license | /*==============================================================*/
/* */
/* INFO 6210 Data Management and Database Design */
/* Group Project */
/* Fall 2016 */
/* */
/* Bernard Kung */
/* Yaqing Wei */
/* Dongqi L... | true |
4bdc6976174742572b836804aafb6d90947e8bfe | SQL | RahilKhan/manageexpense | /Database/ME-DBS_1.0.1/full_install/Common/objects/source/dfp/tab_script/dim_webgl_vendor_renderer.sql | UTF-8 | 1,543 | 3.25 | 3 | [] | no_license | prompt
prompt Creating table DIM_WEBGL_VENDOR_RENDERER
prompt ============================
prompt
declare
lv_tbl exception;
pragma exception_init(lv_tbl,-00942);
lv_part_name varchar2(100);
begin
begin
execute immediate 'drop table DIM_WEBGL_VENDOR_RENDERER purge';
exception
when lv_tbl then
null;
end;
... | true |
f9bb84572de61cf28007ad9df65b03d25cfe7c1a | SQL | DaveAlsina/dataBasesManagement | /parciales/parcial1/solucion_DavidAlsina/p1_DavidAlsina.sql | UTF-8 | 2,341 | 4 | 4 | [] | no_license | ------------------- -------------------
------------------- CONSULTAS -------------------
------------------- -------------------
-------- 1)
select nombre, apellido from
estudiante
where genero = 'F';
-------- 2)
select nombre from grupo
where periodo = 1 and anio = 2019;
-------- 3)
select avg(calificaci... | true |
f632272d7e548a218458c12ef8cbf4811e980b66 | SQL | BorjaLL/StackOverflow-Questions | /day 17 part 1.sql | UTF-8 | 2,554 | 2.84375 | 3 | [] | no_license | DECLARE
v_p NUMBER := 0;
v_dvalue NUMBER := 0;
v_v5 NUMBER := 0;
v_rb NUMBER := 0; --relative base
v_go NUMBER := 0;
v_debugid NUMBER := 0;
v_item VARCHAR2(3200);
v_base1 VARCHAR2(3200);
v_x NUMBER := 0;
v_y NUM... | true |
9bdd4d4ee2942d3e5d7a7f10770131d66d010c89 | SQL | mundodron/arduino-bot-aurelio | /Querys/~ebC513.sql | UTF-8 | 1,273 | 2.890625 | 3 | [] | no_license | select * from customer_id_acct_map where external_id = '999982657141'
select * from bill_invoice_detail where bill_ref_no = 133977579
select * from cmf_balance where bill_ref_no = 133977579
select * from cmf_balance where bill_ref_no in (133977579)
select * from VERIPARCELAMENTO
select B.BILL_REF_NO
f... | true |
faa35ff600df68403cc6f19b5ca6dc396f521fa3 | SQL | VictorT314/turma11mysql | /MySQL/Atividade 3/Exercício 1/Selects.sql | UTF-8 | 743 | 3.578125 | 4 | [] | no_license | #SELECTS GERAIS
select * from tb_categoria;
select * from tb_produto;
#PRODUTOS COM VALOR MAIOR DO QUE 50 REAIS
select * from tb_produto
inner join tb_categoria
where tb_categoria.id_categoria = tb_produto.id_categoria and preco_kg > 50;
#PRODUTOS COM VALOR ENTRE 3 E 60 REAIS
select * from tb_produto
inner join tb_ca... | true |
a2e6df1546a2d9c19ec6292cd5d559ee7df634d1 | SQL | Min-Flower/twu-biblioteca-MinWang | /database/q3.sql | UTF-8 | 304 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | -- 3. What books AND movies aren't checked OUT?
SELECT b.title
FROM book AS b
WHERE b.id NOT IN (
SELECT c.book_id
FROM checkout_item AS c
WHERE c.book_id IS NOT NULL
)
UNION
SELECT m.title
FROM movie AS m
WHERE m.id NOT IN (
SELECT c.movie_id
FROM checkout_item AS c
WHERE c.movie_id IS NOT NULL
) | true |
8223b11b3cacbaf46cee64a4c0e366f268501f69 | SQL | UliksSekiraqa/HackSurreySubmissionUliksDimaTauras | /includes/CreateUserTable.sql | UTF-8 | 548 | 2.875 | 3 | [] | no_license | CREATE TABLE `users` (
`UserID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`Email` varchar(254) NOT NULL,
`Forename` varchar(255) NOT NULL,
`Surname` varchar(255) NOT NULL,
`Registration_date` date NOT NULL,
`Date_of_birth` date DEFAULT NULL,
`Password_hash` varchar(255) NOT NULL,
`Location` varchar(255) DEFAULT... | true |
4a8649bc2c91d53f520635ddde63f2b11a9b8f14 | SQL | raymin/mytime | /db/001_ddl/004_create_link.sql | UTF-8 | 644 | 3.171875 | 3 | [] | no_license | DROP TABLE IF EXISTS T_LINK;
CREATE TABLE T_LINK (
ID BIGINT(20) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
USER_ID BIGINT(20) UNSIGNED,
POST_ID BIGINT(20) UNSIGNED,
LINK_URL VARCHAR(255),
LINK_NAME VARCHAR(255),
LINK_IMAGE VARCHAR(255),
LINK_TARGET VARCHAR(2... | true |
307c4d73a99ec36b6986aaf52b597b97cacebf0b | SQL | MrIvanPlays/SimpleRegister | /plugin/src/main/resources/com/mrivanplays/simpleregister/sql/schemas/h2.sql | UTF-8 | 257 | 2.671875 | 3 | [
"MIT"
] | permissive | CREATE TABLE IF NOT EXISTS simpleregister_passwords(
`id` INT AUTO_INCREMENT,
`name` VARCHAR(255),
`uuid` VARCHAR(36),
`ip` VARCHAR(255),
`password` VARCHAR(255),
PRIMARY KEY (`id`)
);
CREATE INDEX ON `simpleregister_passwords` (`uuid`); | true |
b1775fc359ccde239be025dfff950a7becfc6b65 | SQL | guitar1999/electricity_logging | /schema/create-view-electricity_dow.sql | UTF-8 | 886 | 3.953125 | 4 | [] | no_license | CREATE OR REPLACE VIEW electricity_plotting.electricity_dow AS (
WITH u AS (
SELECT
ROW_NUMBER() OVER (ORDER BY sum_date DESC),
sum_date,
SUM(kwh) AS kwh,
CASE WHEN 'no' = ANY (array_agg(complete)) THEN 'no' ELSE 'yes' END AS complete
FROM
... | true |
3cc1d53cb92f8e5397fd503fe0a5b9e8efe0f0b5 | SQL | lesonlhld/CNPMNC | /CNPMNC/Database/Create table.sql | UTF-8 | 1,142 | 3.65625 | 4 | [] | no_license | drop database if exists SAP;
create database SAP;
use SAP;
create table accommodation(
id int not null auto_increment,
address text not null,
type_acc varchar(45) not null,
cost int not null,
description_acc text,
contact varchar(45) not null,
status_acc varchar(10) not null,
image text nul... | true |
c863f782c46faf4ed8caf06d2f050dec4ef54979 | SQL | VijayEluri/all | /xcode/mytodo/Design/create_tables_v2.sql | UTF-8 | 1,023 | 3.265625 | 3 | [] | no_license | /*
priority:
0: low
1: normal
2: high
3: urgent
*/
drop table task;
create table task (
task_id INTEGER PRIMARY KEY,
parent_id INTEGER,
category_id INTEGER,
content TEXT,
note TEXT,
priority INTEGER,
completed INTEGER,
float INTEGER,
trash INTEGER,
stared INTEGER,
due_date TEXT,
completi... | true |
3b028793ee2757d5bd0b9584ac01aecd1ef08e34 | SQL | kkousounnis/Mysql_Excersises | /MySQL_Excercises/SQL_JOINS/Right.sql | UTF-8 | 185 | 3.015625 | 3 | [
"MIT"
] | permissive | SELECT
`employees`.`employeeNumber`,
`customers`.`customerNumber`
FROM
`customers`
RIGHT JOIN `employees`
ON `customers`.`salesRepEmployeeNumber` = `employees`.`employeeNumber` | true |
96dbd3783b3cf06c0bf19c94282d7cb741b5964c | SQL | bravesoftdz/sgts | /sql/oracle/uninstall/005_drop_table_converter_passports.sql | WINDOWS-1251 | 1,118 | 2.71875 | 3 | [] | no_license | /* */
DROP VIEW S_CONVERTER_PASSPORTS
--
/* */
DROP PROCEDURE I_CONVERTER_PASSPORT
--
/* */
DROP PROCEDURE U_CONVERTER_PASSPORT
--
/* */
DROP PROCEDURE D_CONVERTER_PASSPORT
--
/* */
DROP SEQUENCE SEQ_CONVERTER_PASSPORTS
--
/* */
DROP FUNCTION GET_CONVERTER_PASSPORT_ID
-... | true |
a085825dab73560d187bdf69f89a052785eff9f0 | SQL | Sergio-DC/Ejercicios-JAVA | /JAVA_SE_PERSISTENCIA_DATOS/mensajes_app/ddl.sql | UTF-8 | 203 | 2.578125 | 3 | [] | no_license | CREATE DATABASE mensaje_app;
USE mensajes_app;
CREATE TABLE mensajes (
id_mensaje INTEGER PRIMARY KEY AUTO_INCREMENT,
mensaje VARCHAR(280) ,
autor_mensaje VARCHAR(50),
fecha_mensaje TIMESTAMP
);
| true |
690e767f092e697dcb36cf5c2a80815c80b9f965 | SQL | michaelcunningham/oracledba | /projects/drop_unused_schemas/chk_joanna_objects.sql | UTF-8 | 252 | 2.734375 | 3 | [] | no_license | column db_name format a30
column username format a10
column segment_name format a30
set linesize 120
select (select name from v$database) db_name, 'JOANNA' username, segment_name, segment_type
from dba_segments
where owner in( 'JOANNA' );
| true |
3fb20d8c16be523c1b9cec3097571a154ced1ede | SQL | alstjd0051/SQL | /oracle_workspace/실습문제/시나리오.sql | UTF-8 | 2,339 | 4.75 | 5 | [] | no_license | --1select emp_name, job_code,count(bonus) as 보너스를받는사원
from employee
--where nonus != '0'
group by job_code,emp_name
order by job_code asc;
. 직원테이블(EMP)이 존재한다.
--직원 테이블에서 사원명,직급코드, 보너스를 받는 사원 수를 조회하여 직급코드 순으로 오름차순 정렬하는 구문을 작성하였다.
--이 때 발생하는 문제점을 [원인](10점)에 기술하고, 이를 해결하기 위한 모든 방법과 구문을 [조치내용](30점)에 기술하시오.
SELECT E... | true |
2f152b19791816ecba92156318acf9578e019027 | SQL | buhti/esup-covoiturage | /src/main/resources/META-INF/sql/install/Customer.sql | UTF-8 | 446 | 3.03125 | 3 | [] | no_license | CREATE TABLE Customer (
customer_id INT NOT NULL AUTO_INCREMENT,
login VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL,
firstname VARCHAR(50) NOT NULL,
lastname VARCHAR(50) NOT NULL,
chatting BOOLEAN NOT NULL,
smoking BOOLEAN NOT NULL,
listening_music BOOLEAN NOT NULL,
last_connection DATETIME NOT NULL,
/*... | true |
f29810097fad371dbb4f643160f498e9daafe64a | SQL | KelwinUTFPR/BLY | /bancotcc.sql | UTF-8 | 16,102 | 3.3125 | 3 | [] | no_license | -- --------------------------------------------------------
-- Servidor: 127.0.0.1
-- Versão do servidor: 10.1.36-MariaDB - mariadb.org binary distribution
-- OS do Servidor: Win32
-- HeidiSQL Versão: 9.5.0.5196
-- ------------------------------------------------... | true |
417433f173f71f3c616066e6754445147fbd4601 | SQL | Al-ta-iR/yandex.praktikum | /09_ data_extraction/03.sql | UTF-8 | 590 | 4.21875 | 4 | [] | no_license | SELECT subq.city,
avg(subq.num_flights) AS average_flights
FROM
(SELECT airports.city AS city,
count(flights.flight_id) AS num_flights,
extract(DAY
FROM flights.arrival_time :: date) AS DAY
FROM flights
JOIN airports ON airports.airport_code = flights.arr... | true |
dc7d4d5bb85764e96706b79ca757718178b1cff3 | SQL | estagumor/Acme-Santiago | /Cosas aparte/Item 7/Create-Acme-Santiago.sql | UTF-8 | 12,162 | 3.234375 | 3 | [] | no_license | start transaction;
create database `Acme-Santiago`;
use `Acme-Santiago`;
create user 'acme-user'@'%' identified by password '*4F10007AADA9EE3DBB2CC36575DFC6F4FDE27577';
create user 'acme-manager'@'%' identified by password '*FDB8CD304EB2317D10C95D797A4BD7492560F55F';
grant select, insert, update, delete on `Acme-... | true |
32d10981ccb3821008b50b14ede48ea1669cd080 | SQL | nss-day-cohort-16/chinook-richievs91 | /SQL Answers/invoice_totals.sql | UTF-8 | 368 | 3.5 | 4 | [] | no_license | -- Provide a query that shows the Invoice Total, Customer name, Country and Sale Agent name for all invoices and customers.
SELECT Invoice.Total, Customer.FirstName, Customer.LastName, Customer.Country, Employee.FirstName, Employee.LastName
FROM Customer, Invoice, Employee
WHERE Invoice.CustomerId = Customer.CustomerId... | true |
689360373f3216c836f5b947d509dd20c11b7cb2 | SQL | mattyschell/geodatabase-toiler | /src/sql_oracle/upsert_open_cursors.sql | UTF-8 | 960 | 3.015625 | 3 | [
"CC0-1.0"
] | permissive | -- https://pro.arcgis.com/en/pro-app/help/data/geodatabases/manage-oracle/update-open-cursors.htm
-- the sde.gdb_util.update_open_cursors expects SYSDBA access to run dbms_utility.get_parameter_value
-- then loops over any user_schema geodatabases to spray the value into all server_config tables
-- we are simpletons h... | true |
8fc47d1747d1ae182cd11e380a614657f34600c1 | SQL | daoleili/springboot-jersey-swagger | /src/main/resources/db/migration/V1.0.1__add_person.sql | UTF-8 | 276 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE PERSON (
id integer not null,
first_name varchar(255) not null,
last_name varchar(255) not null,
primary key(id)
);
insert into PERSON (id, first_name, last_name) values (1, 'Bright', 'Zheng');
-- alter table student add column remarks varchar(200) null; | true |
5dae2f91277f32297407fe719dfba1511d784b48 | SQL | ltao01/hotel02 | /djin_hotel.sql | UTF-8 | 14,227 | 3.046875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : djin
Source Server Version : 50717
Source Host : localhost:3306
Source Database : k8514hotel
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-06-11 13:22:20
*/
SET FOREIGN_KEY_CHECKS=0;
-- ---... | true |
bff4a9f30c027741dbc50c6c168d0afd48d9a85a | SQL | GuUrban/SQL-2013-course-notes- | /exam4 social-network modification.sql | UTF-8 | 1,818 | 3.90625 | 4 | [] | no_license | --Exam4 , data link:https://lagunita.stanford.edu/c4x/DB/SQL/asset/socialdata.html
--Movie ( mID, title, year, director )
--English: There is a movie with ID number mID, a title, a release year, and a director.
--Reviewer ( rID, name )
--English: The reviewer with ID number rID has a certain name.
--Rating ( rI... | true |
980449deb7824e7817774e064a4446702c4d6e09 | SQL | ivaneyvieira/engEstoque | /src/main/resources/sqlSaci/findNotaEntradaInfo.sql | UTF-8 | 793 | 3.171875 | 3 | [] | no_license | SELECT N.invno,
N.storeno,
CAST(nfname AS CHAR) AS numero,
invse AS serie,
N.date,
N.bits & POW(2, 4) != 0 AS cancelado,
CASE
WHEN invse = '66'
THEN 'ACERTO_E'
WHEN type = 0
THEN 'COMPRA'
WHEN t... | true |
61e210eb033d9cce63500da1d1cf6ad9ae3d3a49 | SQL | NikitaMandlik12/Data-Warehouse-Project | /FIT5195_A2_Aggregation 2_V1.sql | UTF-8 | 14,290 | 3.875 | 4 | [] | no_license | ---Creating star schema for property with Aggregation level 2
--Creating VisitTime2DIM dimension
Drop table visitTime2DIM;
Create table VisitTime2DIM as
select Distinct
to_char(VISIT_DATE, 'DD-MM-YYYY') as VisitDate
from visit;
select * from visitTime2DIM;
--Creating property2DIM dimension
Drop tabl... | true |
08bc3abe90d6de6522318c87346d5c7529acef39 | SQL | kevharvell/StockLikes | /database/DMQ.sql | UTF-8 | 4,322 | 4.28125 | 4 | [] | no_license | /*
GAMING STOCK LIKES
Description: Gaming Stock Likes is a database centered around gaming companies that hopefully will be
utilized one day as a stock market sentiment indicator. A stock market sentiment indicator can be used
to see how a group feels about a certain market. In our case, we will be using various gami... | true |
69aa557f739f970b4789d3d77ec042c15206ff54 | SQL | buzgarandrei/booking | /sql/FindRooms.sql | UTF-8 | 1,882 | 4.03125 | 4 | [] | no_license | select r.id,
/* r.available,
r.id_hotel,
r.nr_of_adults,
r.nr_of_kids,
r.id_room_description*/
p.amount,
p.start_date,
p.end_date,
CASE
WHEN '2019-12-17' >= p.start_date AND '2020-01-02' >= p.end_date THEN DATEDIFF(p.end_date, '2019-12-17') + 1
... | true |
9ecb59dc8df97df88529787164f53d169e445f41 | SQL | macgibbons/SQL_Mastery_Queries- | /book2/Chapter 4/Chapter_4.sql | UTF-8 | 2,020 | 4.5625 | 5 | [] | no_license | -- Produce a report that lists every dealership,
--the number of purchases done by each, and the number of leases done by each
SELECT
d.business_name, st.name, COUNT(s.sale_id) as number_of_sales
FROM
dealerships d
JOIN sales s
ON s.dealership_id = d.dealership_id
JOIN salestypes st
ON s.sales_type... | true |
a6eb8ebc6782c97b3cc39905efe3807de82355f1 | SQL | aurreco-uga/service-dataset-access | /src/main/resources/sql/select/studyaccess/providers/by-dataset.sql | UTF-8 | 611 | 3.65625 | 4 | [] | no_license | SELECT
p.*
, a.email
, (
SELECT value
FROM useraccounts.account_properties
WHERE user_id = p.user_id
AND key = 'first_name'
) first_name
, (
SELECT value
FROM useraccounts.account_properties
WHERE user_id = p.user_id
AND key = 'last_name'
) last_name
, (
SELECT value
FROM u... | true |
78bbe52e6a5e63b659dc20c8d3862a7d52bdce64 | SQL | isiahmacs/SECURDE | /SECURDE_MP/PokeMerch DB/pokemerch_transactions.sql | UTF-8 | 2,133 | 2.96875 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: pokemerch
-- ------------------------------------------------------
-- Server version 5.7.19-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS *... | true |
2276b95e784c74d9bba4bed92509d4d34cbbd674 | SQL | kaan3434/gvindelen | /ESTD/script/MetaData/QUERIES.sql | UTF-8 | 8,154 | 3 | 3 | [] | no_license | INSERT INTO QUERIES (QUERY_SIGN, QUERY_TEXT) VALUES ('ALL_OBJECTS_BY_DOCUMENT', 'select
objects.obj_id,
objects.objtype,
objects.kei,
objects.obj_label,
objects.obj_code,
objects.obj_name,
objects.obj_gost
from
objects
where
objects.obj_id = :document_id
or
objects.obj_id in (
sel... | true |
c085dbfbffd888e4ca831c963e0003840f5afa79 | SQL | coodelearning/data-structure-and-algorithm-exercises | /database/leetcode.sql | UTF-8 | 1,022 | 4.53125 | 5 | [] | no_license | # 175. 组合两个表 https://leetcode-cn.com/problems/combine-two-tables/
SELECT `FirstName`
,`LastName`
,`City`
,`State`
FROM Person
LEFT JOIN Address
ON Address.PersonId = Person.PersonId;
# 182. 查找重复的电子邮箱 https://leetcode-cn.com/problems/duplicate-emails/
# Function 1:
# Step1:获得临时表
SELECT Email
... | true |
2a118e535129a61777b875ccc4d80270bebeb95b | SQL | vusal87/07.02.2017 | /azturizm.sql | UTF-8 | 4,766 | 3.125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 08, 2017 at 06:05 AM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SE... | true |
5c9833c932feea74e2d4082fca864b558060529c | SQL | LiliFelsen/sql-library-lab-web-051517 | /lib/insert.sql | UTF-8 | 1,054 | 2.90625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | INSERT INTO series (id, title, author_id, subgenre_id)
VALUES (1, "GOT", 2, 3), (2, "SCANDAL", 4, 5);
INSERT INTO books (id, title, year, series_id)
VALUES (1, "GOT", 1987, 3), (2, "SCANDAL", 2016, 5), (3, "GOT", 2016, 3), (4, "SCANDAL", 1999, 5), (5, "GOT", 2005, 3), (6, "SCANDAL", 2010, 5);
INSERT INTO characters (... | true |
dc1e9f012db2f67e770ae491703453ec44d098b3 | SQL | TheodoraDimitrova/Database-Basics---MySQL | /2.BASIC CRUD/Basic CRUD - Exercise/22. Biggest Countries by Population.sql | UTF-8 | 137 | 2.828125 | 3 | [] | no_license | SELECT
country_name, population
FROM
countries
WHERE
continent_code = 'EU'
ORDER BY population DESC , country_name
LIMIT 30; | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.